From 236dfa65e623c9d3808b9092ed6e1079fbeb1633 Mon Sep 17 00:00:00 2001 From: edyfox Date: Thu, 13 Mar 2008 04:07:38 +0000 Subject: [PATCH] Merged from the latest developing branch. git-svn-id: https://vim.svn.sourceforge.net/svnroot/vim/trunk@961 2a77ed30-b011-0410-a7ad-c7884a0aa172 --- runtime/doc/options.txt | 4 ++-- src/edit.c | 4 ++-- src/gui_mac.c | 8 +++----- src/ops.c | 7 ++++--- src/option.c | 3 ++- src/proto/ops.pro | 2 +- src/version.c | 6 ++++++ src/vim.h | 1 + 8 files changed, 21 insertions(+), 14 deletions(-) diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 40e1c009..568228c6 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -1,4 +1,4 @@ -*options.txt* For Vim version 7.1. Last change: 2007 Aug 10 +*options.txt* For Vim version 7.1. Last change: 2008 Feb 24 VIM REFERENCE MANUAL by Bram Moolenaar @@ -4878,7 +4878,7 @@ A jump table for the options with a short description can be found at |Q_op|. |autocmd-osfiletypes| *'paragraphs'* *'para'* -'paragraphs' 'para' string (default "IPLPPPQPP LIpplpipbp") +'paragraphs' 'para' string (default "IPLPPPQPP TPHPLIPpLpItpplpipbp") global Specifies the nroff macros that separate paragraphs. These are pairs of two letters (see |object-motions|). diff --git a/src/edit.c b/src/edit.c index 6a2f9518..fb17eecc 100644 --- a/src/edit.c +++ b/src/edit.c @@ -5491,7 +5491,7 @@ insertchar(c, flags, second_indent) #if defined(FEAT_EVAL) int do_internal = TRUE; - if (*curbuf->b_p_fex != NUL) + if (*curbuf->b_p_fex != NUL && (flags & INSCHAR_NO_FEX) == 0) { do_internal = (fex_format(curwin->w_cursor.lnum, 1L, c) != 0); /* It may be required to save for undo again, e.g. when setline() @@ -6057,7 +6057,7 @@ auto_format(trailblank, prev_line) * be adjusted for the text formatting. */ saved_cursor = pos; - format_lines((linenr_T)-1); + format_lines((linenr_T)-1, FALSE); curwin->w_cursor = saved_cursor; saved_cursor.lnum = 0; diff --git a/src/gui_mac.c b/src/gui_mac.c index 901e81f4..77006a73 100644 --- a/src/gui_mac.c +++ b/src/gui_mac.c @@ -3037,13 +3037,11 @@ receiveHandler(WindowRef theWindow, void *handlerRefCon, DragRef theDrag) gui_mch_init(void) { /* TODO: Move most of this stuff toward gui_mch_init */ - Rect windRect; - MenuHandle pomme; + Rect windRect; + MenuHandle pomme; EventHandlerRef mouseWheelHandlerRef; -#ifdef USE_CARBONKEYHANDLER EventTypeSpec eventTypeSpec; -#endif - ControlRef rootControl; + ControlRef rootControl; if (Gestalt(gestaltSystemVersion, &gMacSystemVersion) != noErr) gMacSystemVersion = 0x1000; /* TODO: Default to minimum sensible value */ diff --git a/src/ops.c b/src/ops.c index 5433f385..ba774b87 100644 --- a/src/ops.c +++ b/src/ops.c @@ -4380,7 +4380,7 @@ op_format(oap, keep_cursor) if (keep_cursor) saved_cursor = oap->cursor_start; - format_lines(oap->line_count); + format_lines(oap->line_count, keep_cursor); /* * Leave the cursor at the first non-blank of the last formatted line. @@ -4495,8 +4495,9 @@ fex_format(lnum, count, c) * first line. */ void -format_lines(line_count) +format_lines(line_count, avoid_fex) linenr_T line_count; + int avoid_fex; /* don't use 'formatexpr' */ { int max_len; int is_not_par; /* current line not part of parag. */ @@ -4666,7 +4667,7 @@ format_lines(line_count) #ifdef FEAT_COMMENTS + (do_comments ? INSCHAR_DO_COM : 0) #endif - , second_indent); + + (avoid_fex ? INSCHAR_NO_FEX : 0), second_indent); State = old_State; p_smd = smd_save; second_indent = -1; diff --git a/src/option.c b/src/option.c index 1d2f2aaf..c4328697 100644 --- a/src/option.c +++ b/src/option.c @@ -1839,7 +1839,8 @@ static struct vimoption }, {"paragraphs", "para", P_STRING|P_VI_DEF, (char_u *)&p_para, PV_NONE, - {(char_u *)"IPLPPPQPP LIpplpipbp", (char_u *)0L}}, + {(char_u *)"IPLPPPQPP TPHPLIPpLpItpplpipbp", + (char_u *)0L}}, {"paste", NULL, P_BOOL|P_VI_DEF|P_PRI_MKRC, (char_u *)&p_paste, PV_NONE, {(char_u *)FALSE, (char_u *)0L}}, diff --git a/src/proto/ops.pro b/src/proto/ops.pro index 9ce80b3a..37c31941 100644 --- a/src/proto/ops.pro +++ b/src/proto/ops.pro @@ -41,7 +41,7 @@ int do_join __ARGS((int insert_space)); void op_format __ARGS((oparg_T *oap, int keep_cursor)); void op_formatexpr __ARGS((oparg_T *oap)); int fex_format __ARGS((linenr_T lnum, long count, int c)); -void format_lines __ARGS((linenr_T line_count)); +void format_lines __ARGS((linenr_T line_count, int avoid_fex)); int paragraph_start __ARGS((linenr_T lnum)); int do_addsub __ARGS((int command, linenr_T Prenum1)); int read_viminfo_register __ARGS((vir_T *virp, int force)); diff --git a/src/version.c b/src/version.c index ef0d8d00..a397e8ac 100644 --- a/src/version.c +++ b/src/version.c @@ -667,6 +667,12 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 278, +/**/ + 277, +/**/ + 276, +/**/ 275, /**/ 274, diff --git a/src/vim.h b/src/vim.h index 7de2b6f4..989dd23c 100644 --- a/src/vim.h +++ b/src/vim.h @@ -949,6 +949,7 @@ extern char *(*dyn_libintl_textdomain)(const char *domainname); #define INSCHAR_FORMAT 1 /* force formatting */ #define INSCHAR_DO_COM 2 /* format comments */ #define INSCHAR_CTRLV 4 /* char typed just after CTRL-V */ +#define INSCHAR_NO_FEX 8 /* don't use 'formatexpr' */ /* flags for open_line() */ #define OPENLINE_DELSPACES 1 /* delete spaces after cursor */ -- 2.11.4.GIT