]> granicus.if.org Git - vim/commitdiff
updated for version 7.1-231 v7.1.231
authorBram Moolenaar <Bram@vim.org>
Wed, 16 Jan 2008 19:03:13 +0000 (19:03 +0000)
committerBram Moolenaar <Bram@vim.org>
Wed, 16 Jan 2008 19:03:13 +0000 (19:03 +0000)
src/edit.c
src/ops.c
src/proto/edit.pro
src/proto/ops.pro
src/version.c

index 4edd0bc0a4f54a2c922301b8d14610aa7f2cf619..4ce11d18290aeb3a0719acce56325a4cd97cde0d 100644 (file)
@@ -1662,11 +1662,12 @@ undisplay_dollar()
  * if round is TRUE, round the indent to 'shiftwidth' (only with _INC and _Dec).
  */
     void
-change_indent(type, amount, round, replaced)
+change_indent(type, amount, round, replaced, call_changed_bytes)
     int                type;
     int                amount;
     int                round;
     int                replaced;       /* replaced character, put on replace stack */
+    int                call_changed_bytes;     /* call changed_bytes() */
 {
     int                vcol;
     int                last_vcol;
@@ -1723,7 +1724,7 @@ change_indent(type, amount, round, replaced)
      * Set the new indent.  The cursor will be put on the first non-blank.
      */
     if (type == INDENT_SET)
-       (void)set_indent(amount, SIN_CHANGED);
+       (void)set_indent(amount, call_changed_bytes ? SIN_CHANGED : 0);
     else
     {
 #ifdef FEAT_VREPLACE
@@ -1733,7 +1734,7 @@ change_indent(type, amount, round, replaced)
        if (State & VREPLACE_FLAG)
            State = INSERT;
 #endif
-       shift_line(type == INDENT_DEC, round, 1);
+       shift_line(type == INDENT_DEC, round, 1, call_changed_bytes);
 #ifdef FEAT_VREPLACE
        State = save_State;
 #endif
@@ -5921,7 +5922,7 @@ internal_format(textwidth, second_indent, flags, format_only)
            {
 #ifdef FEAT_VREPLACE
                if (State & VREPLACE_FLAG)
-                   change_indent(INDENT_SET, second_indent, FALSE, NUL);
+                   change_indent(INDENT_SET, second_indent, FALSE, NUL, TRUE);
                else
 #endif
                    (void)set_indent(second_indent, SIN_CHANGED);
@@ -7227,7 +7228,7 @@ cindent_on()
 fixthisline(get_the_indent)
     int (*get_the_indent) __ARGS((void));
 {
-    change_indent(INDENT_SET, get_the_indent(), FALSE, 0);
+    change_indent(INDENT_SET, get_the_indent(), FALSE, 0, TRUE);
     if (linewhite(curwin->w_cursor.lnum))
        did_ai = TRUE;      /* delete the indent if the line stays empty */
 }
@@ -8170,10 +8171,10 @@ ins_shift(c, lastc)
            replace_pop_ins();
        if (lastc == '^')
            old_indent = get_indent();  /* remember curr. indent */
-       change_indent(INDENT_SET, 0, TRUE, 0);
+       change_indent(INDENT_SET, 0, TRUE, 0, TRUE);
     }
     else
-       change_indent(c == Ctrl_D ? INDENT_DEC : INDENT_INC, 0, TRUE, 0);
+       change_indent(c == Ctrl_D ? INDENT_DEC : INDENT_INC, 0, TRUE, 0, TRUE);
 
     if (did_ai && *skipwhite(ml_get_curline()) != NUL)
        did_ai = FALSE;
@@ -9633,7 +9634,7 @@ ins_try_si(c)
            curwin->w_cursor = old_pos;
 #ifdef FEAT_VREPLACE
            if (State & VREPLACE_FLAG)
-               change_indent(INDENT_SET, i, FALSE, NUL);
+               change_indent(INDENT_SET, i, FALSE, NUL, TRUE);
            else
 #endif
                (void)set_indent(i, SIN_CHANGED);
@@ -9662,7 +9663,7 @@ ins_try_si(c)
                curwin->w_cursor = old_pos;
            }
            if (temp)
-               shift_line(TRUE, FALSE, 1);
+               shift_line(TRUE, FALSE, 1, TRUE);
        }
     }
 
index f348a890e99118f9125b9e402028fa3d2f6913cb..b5b064b5914e5f043a8b5e6f10bafda12e230bec 100644 (file)
--- a/src/ops.c
+++ b/src/ops.c
@@ -258,7 +258,7 @@ op_shift(oap, curs_top, amount)
            if (first_char != '#' || !preprocs_left())
 #endif
        {
-           shift_line(oap->op_type == OP_LSHIFT, p_sr, amount);
+           shift_line(oap->op_type == OP_LSHIFT, p_sr, amount, FALSE);
        }
        ++curwin->w_cursor.lnum;
     }
@@ -321,10 +321,11 @@ op_shift(oap, curs_top, amount)
  * leaves cursor on first blank in the line
  */
     void
-shift_line(left, round, amount)
+shift_line(left, round, amount, call_changed_bytes)
     int        left;
     int        round;
     int        amount;
+    int call_changed_bytes;    /* call changed_bytes() */
 {
     int                count;
     int                i, j;
@@ -363,10 +364,10 @@ shift_line(left, round, amount)
     /* Set new indent */
 #ifdef FEAT_VREPLACE
     if (State & VREPLACE_FLAG)
-       change_indent(INDENT_SET, count, FALSE, NUL);
+       change_indent(INDENT_SET, count, FALSE, NUL, call_changed_bytes);
     else
 #endif
-       (void)set_indent(count, SIN_CHANGED);
+       (void)set_indent(count, call_changed_bytes ? SIN_CHANGED : 0);
 }
 
 #if defined(FEAT_VISUALEXTRA) || defined(PROTO)
index 710a76e6fcd039a8951b2a0a6ef1bb46061dd6da..0fb787fad8d6b930ef3543db3ca27c2de0b68e94 100644 (file)
@@ -3,7 +3,7 @@ int edit __ARGS((int cmdchar, int startln, long count));
 void edit_putchar __ARGS((int c, int highlight));
 void edit_unputchar __ARGS((void));
 void display_dollar __ARGS((colnr_T col));
-void change_indent __ARGS((int type, int amount, int round, int replaced));
+void change_indent __ARGS((int type, int amount, int round, int replaced, int call_changed_bytes));
 void truncate_spaces __ARGS((char_u *line));
 void backspace_until_column __ARGS((int col));
 int vim_is_ctrl_x_key __ARGS((int c));
index 2cb05ab4a17d1207d9f78ab1836ae0ff250d7f53..9ce80b3a9ceeaa2e84f7d2dbc1f994a237f66eef 100644 (file)
@@ -4,7 +4,7 @@ int op_on_lines __ARGS((int op));
 int get_op_char __ARGS((int optype));
 int get_extra_op_char __ARGS((int optype));
 void op_shift __ARGS((oparg_T *oap, int curs_top, int amount));
-void shift_line __ARGS((int left, int round, int amount));
+void shift_line __ARGS((int left, int round, int amount, int call_changed_bytes));
 void op_reindent __ARGS((oparg_T *oap, int (*how)(void)));
 int get_expr_register __ARGS((void));
 void set_expr_line __ARGS((char_u *new_line));
index 27daf07fb84df93561160e40fa95e2ec5b921af5..2472995781c00a9c7051ba36e3cf50404e762f77 100644 (file)
@@ -666,6 +666,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    231,
 /**/
     230,
 /**/