diff options
author | Bram Moolenaar <Bram@vim.org> | 2008-03-12 16:27:00 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2008-03-12 16:27:00 +0000 |
commit | 81a82093230a5afe14e8efacea3114da32099c6b (patch) | |
tree | a29e5e348192d7cc6621182e7ba8b34afeac5194 /src | |
parent | 1b60e50bf215df9e066d085cf135e4414c551dcc (diff) | |
download | vim-81a82093230a5afe14e8efacea3114da32099c6b.zip |
updated for version 7.1-276
Diffstat (limited to 'src')
-rw-r--r-- | src/edit.c | 4 | ||||
-rw-r--r-- | src/ops.c | 7 | ||||
-rw-r--r-- | src/proto/ops.pro | 2 | ||||
-rw-r--r-- | src/version.c | 2 | ||||
-rw-r--r-- | src/vim.h | 1 |
5 files changed, 10 insertions, 6 deletions
diff --git a/src/edit.c b/src/edit.c index 6a2f9518d..fb17eecc9 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; @@ -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/proto/ops.pro b/src/proto/ops.pro index 9ce80b3a9..37c319414 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 ef0d8d00c..504f855a7 100644 --- a/src/version.c +++ b/src/version.c @@ -667,6 +667,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 276, +/**/ 275, /**/ 274, @@ -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 */ |