• R/O
  • SSH

vim: Commit

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


Commit MetaInfo

Révisionee9d2d24ea9bd0a7d500f1c37cbea802d8d1d88c (tree)
l'heure2008-01-17 04:03:13
Auteurvimboss
Commitervimboss

Message de Log

updated for version 7.1-231

Change Summary

Modification

diff -r 8d8dc7e07999 -r ee9d2d24ea9b src/edit.c
--- a/src/edit.c Tue Jan 15 21:17:30 2008 +0000
+++ b/src/edit.c Wed Jan 16 19:03:13 2008 +0000
@@ -1662,11 +1662,12 @@
16621662 * if round is TRUE, round the indent to 'shiftwidth' (only with _INC and _Dec).
16631663 */
16641664 void
1665-change_indent(type, amount, round, replaced)
1665+change_indent(type, amount, round, replaced, call_changed_bytes)
16661666 int type;
16671667 int amount;
16681668 int round;
16691669 int replaced; /* replaced character, put on replace stack */
1670+ int call_changed_bytes; /* call changed_bytes() */
16701671 {
16711672 int vcol;
16721673 int last_vcol;
@@ -1723,7 +1724,7 @@
17231724 * Set the new indent. The cursor will be put on the first non-blank.
17241725 */
17251726 if (type == INDENT_SET)
1726- (void)set_indent(amount, SIN_CHANGED);
1727+ (void)set_indent(amount, call_changed_bytes ? SIN_CHANGED : 0);
17271728 else
17281729 {
17291730 #ifdef FEAT_VREPLACE
@@ -1733,7 +1734,7 @@
17331734 if (State & VREPLACE_FLAG)
17341735 State = INSERT;
17351736 #endif
1736- shift_line(type == INDENT_DEC, round, 1);
1737+ shift_line(type == INDENT_DEC, round, 1, call_changed_bytes);
17371738 #ifdef FEAT_VREPLACE
17381739 State = save_State;
17391740 #endif
@@ -5921,7 +5922,7 @@
59215922 {
59225923 #ifdef FEAT_VREPLACE
59235924 if (State & VREPLACE_FLAG)
5924- change_indent(INDENT_SET, second_indent, FALSE, NUL);
5925+ change_indent(INDENT_SET, second_indent, FALSE, NUL, TRUE);
59255926 else
59265927 #endif
59275928 (void)set_indent(second_indent, SIN_CHANGED);
@@ -7227,7 +7228,7 @@
72277228 fixthisline(get_the_indent)
72287229 int (*get_the_indent) __ARGS((void));
72297230 {
7230- change_indent(INDENT_SET, get_the_indent(), FALSE, 0);
7231+ change_indent(INDENT_SET, get_the_indent(), FALSE, 0, TRUE);
72317232 if (linewhite(curwin->w_cursor.lnum))
72327233 did_ai = TRUE; /* delete the indent if the line stays empty */
72337234 }
@@ -8170,10 +8171,10 @@
81708171 replace_pop_ins();
81718172 if (lastc == '^')
81728173 old_indent = get_indent(); /* remember curr. indent */
8173- change_indent(INDENT_SET, 0, TRUE, 0);
8174+ change_indent(INDENT_SET, 0, TRUE, 0, TRUE);
81748175 }
81758176 else
8176- change_indent(c == Ctrl_D ? INDENT_DEC : INDENT_INC, 0, TRUE, 0);
8177+ change_indent(c == Ctrl_D ? INDENT_DEC : INDENT_INC, 0, TRUE, 0, TRUE);
81778178
81788179 if (did_ai && *skipwhite(ml_get_curline()) != NUL)
81798180 did_ai = FALSE;
@@ -9633,7 +9634,7 @@
96339634 curwin->w_cursor = old_pos;
96349635 #ifdef FEAT_VREPLACE
96359636 if (State & VREPLACE_FLAG)
9636- change_indent(INDENT_SET, i, FALSE, NUL);
9637+ change_indent(INDENT_SET, i, FALSE, NUL, TRUE);
96379638 else
96389639 #endif
96399640 (void)set_indent(i, SIN_CHANGED);
@@ -9662,7 +9663,7 @@
96629663 curwin->w_cursor = old_pos;
96639664 }
96649665 if (temp)
9665- shift_line(TRUE, FALSE, 1);
9666+ shift_line(TRUE, FALSE, 1, TRUE);
96669667 }
96679668 }
96689669
diff -r 8d8dc7e07999 -r ee9d2d24ea9b src/ops.c
--- a/src/ops.c Tue Jan 15 21:17:30 2008 +0000
+++ b/src/ops.c Wed Jan 16 19:03:13 2008 +0000
@@ -258,7 +258,7 @@
258258 if (first_char != '#' || !preprocs_left())
259259 #endif
260260 {
261- shift_line(oap->op_type == OP_LSHIFT, p_sr, amount);
261+ shift_line(oap->op_type == OP_LSHIFT, p_sr, amount, FALSE);
262262 }
263263 ++curwin->w_cursor.lnum;
264264 }
@@ -321,10 +321,11 @@
321321 * leaves cursor on first blank in the line
322322 */
323323 void
324-shift_line(left, round, amount)
324+shift_line(left, round, amount, call_changed_bytes)
325325 int left;
326326 int round;
327327 int amount;
328+ int call_changed_bytes; /* call changed_bytes() */
328329 {
329330 int count;
330331 int i, j;
@@ -363,10 +364,10 @@
363364 /* Set new indent */
364365 #ifdef FEAT_VREPLACE
365366 if (State & VREPLACE_FLAG)
366- change_indent(INDENT_SET, count, FALSE, NUL);
367+ change_indent(INDENT_SET, count, FALSE, NUL, call_changed_bytes);
367368 else
368369 #endif
369- (void)set_indent(count, SIN_CHANGED);
370+ (void)set_indent(count, call_changed_bytes ? SIN_CHANGED : 0);
370371 }
371372
372373 #if defined(FEAT_VISUALEXTRA) || defined(PROTO)
diff -r 8d8dc7e07999 -r ee9d2d24ea9b src/proto/edit.pro
--- a/src/proto/edit.pro Tue Jan 15 21:17:30 2008 +0000
+++ b/src/proto/edit.pro Wed Jan 16 19:03:13 2008 +0000
@@ -3,7 +3,7 @@
33 void edit_putchar __ARGS((int c, int highlight));
44 void edit_unputchar __ARGS((void));
55 void display_dollar __ARGS((colnr_T col));
6-void change_indent __ARGS((int type, int amount, int round, int replaced));
6+void change_indent __ARGS((int type, int amount, int round, int replaced, int call_changed_bytes));
77 void truncate_spaces __ARGS((char_u *line));
88 void backspace_until_column __ARGS((int col));
99 int vim_is_ctrl_x_key __ARGS((int c));
diff -r 8d8dc7e07999 -r ee9d2d24ea9b src/proto/ops.pro
--- a/src/proto/ops.pro Tue Jan 15 21:17:30 2008 +0000
+++ b/src/proto/ops.pro Wed Jan 16 19:03:13 2008 +0000
@@ -4,7 +4,7 @@
44 int get_op_char __ARGS((int optype));
55 int get_extra_op_char __ARGS((int optype));
66 void op_shift __ARGS((oparg_T *oap, int curs_top, int amount));
7-void shift_line __ARGS((int left, int round, int amount));
7+void shift_line __ARGS((int left, int round, int amount, int call_changed_bytes));
88 void op_reindent __ARGS((oparg_T *oap, int (*how)(void)));
99 int get_expr_register __ARGS((void));
1010 void set_expr_line __ARGS((char_u *new_line));
diff -r 8d8dc7e07999 -r ee9d2d24ea9b src/version.c
--- a/src/version.c Tue Jan 15 21:17:30 2008 +0000
+++ b/src/version.c Wed Jan 16 19:03:13 2008 +0000
@@ -667,6 +667,8 @@
667667 static int included_patches[] =
668668 { /* Add new patch number below this line */
669669 /**/
670+ 231,
671+/**/
670672 230,
671673 /**/
672674 229,
Afficher sur ancien navigateur de dépôt.