• R/O
  • SSH

vim: Commit

Mirror of the Vim source from https://github.com/vim/vim


Commit MetaInfo

Revisioned7fefbef738386c39248b501556bdea80d0f8b4 (tree)
Time2008-03-13 01:27:00
Authorvimboss
Commitervimboss

Log Message

updated for version 7.1-276

Change Summary

Incremental Difference

diff -r 437fb19625c9 -r ed7fefbef738 src/edit.c
--- a/src/edit.c Wed Mar 12 13:40:54 2008 +0000
+++ b/src/edit.c Wed Mar 12 16:27:00 2008 +0000
@@ -5491,7 +5491,7 @@
54915491 #if defined(FEAT_EVAL)
54925492 int do_internal = TRUE;
54935493
5494- if (*curbuf->b_p_fex != NUL)
5494+ if (*curbuf->b_p_fex != NUL && (flags & INSCHAR_NO_FEX) == 0)
54955495 {
54965496 do_internal = (fex_format(curwin->w_cursor.lnum, 1L, c) != 0);
54975497 /* It may be required to save for undo again, e.g. when setline()
@@ -6057,7 +6057,7 @@
60576057 * be adjusted for the text formatting.
60586058 */
60596059 saved_cursor = pos;
6060- format_lines((linenr_T)-1);
6060+ format_lines((linenr_T)-1, FALSE);
60616061 curwin->w_cursor = saved_cursor;
60626062 saved_cursor.lnum = 0;
60636063
diff -r 437fb19625c9 -r ed7fefbef738 src/ops.c
--- a/src/ops.c Wed Mar 12 13:40:54 2008 +0000
+++ b/src/ops.c Wed Mar 12 16:27:00 2008 +0000
@@ -4380,7 +4380,7 @@
43804380 if (keep_cursor)
43814381 saved_cursor = oap->cursor_start;
43824382
4383- format_lines(oap->line_count);
4383+ format_lines(oap->line_count, keep_cursor);
43844384
43854385 /*
43864386 * Leave the cursor at the first non-blank of the last formatted line.
@@ -4495,8 +4495,9 @@
44954495 * first line.
44964496 */
44974497 void
4498-format_lines(line_count)
4498+format_lines(line_count, avoid_fex)
44994499 linenr_T line_count;
4500+ int avoid_fex; /* don't use 'formatexpr' */
45004501 {
45014502 int max_len;
45024503 int is_not_par; /* current line not part of parag. */
@@ -4666,7 +4667,7 @@
46664667 #ifdef FEAT_COMMENTS
46674668 + (do_comments ? INSCHAR_DO_COM : 0)
46684669 #endif
4669- , second_indent);
4670+ + (avoid_fex ? INSCHAR_NO_FEX : 0), second_indent);
46704671 State = old_State;
46714672 p_smd = smd_save;
46724673 second_indent = -1;
diff -r 437fb19625c9 -r ed7fefbef738 src/proto/ops.pro
--- a/src/proto/ops.pro Wed Mar 12 13:40:54 2008 +0000
+++ b/src/proto/ops.pro Wed Mar 12 16:27:00 2008 +0000
@@ -41,7 +41,7 @@
4141 void op_format __ARGS((oparg_T *oap, int keep_cursor));
4242 void op_formatexpr __ARGS((oparg_T *oap));
4343 int fex_format __ARGS((linenr_T lnum, long count, int c));
44-void format_lines __ARGS((linenr_T line_count));
44+void format_lines __ARGS((linenr_T line_count, int avoid_fex));
4545 int paragraph_start __ARGS((linenr_T lnum));
4646 int do_addsub __ARGS((int command, linenr_T Prenum1));
4747 int read_viminfo_register __ARGS((vir_T *virp, int force));
diff -r 437fb19625c9 -r ed7fefbef738 src/version.c
--- a/src/version.c Wed Mar 12 13:40:54 2008 +0000
+++ b/src/version.c Wed Mar 12 16:27:00 2008 +0000
@@ -667,6 +667,8 @@
667667 static int included_patches[] =
668668 { /* Add new patch number below this line */
669669 /**/
670+ 276,
671+/**/
670672 275,
671673 /**/
672674 274,
diff -r 437fb19625c9 -r ed7fefbef738 src/vim.h
--- a/src/vim.h Wed Mar 12 13:40:54 2008 +0000
+++ b/src/vim.h Wed Mar 12 16:27:00 2008 +0000
@@ -949,6 +949,7 @@
949949 #define INSCHAR_FORMAT 1 /* force formatting */
950950 #define INSCHAR_DO_COM 2 /* format comments */
951951 #define INSCHAR_CTRLV 4 /* char typed just after CTRL-V */
952+#define INSCHAR_NO_FEX 8 /* don't use 'formatexpr' */
952953
953954 /* flags for open_line() */
954955 #define OPENLINE_DELSPACES 1 /* delete spaces after cursor */
Show on old repository browser