• R/O
  • SSH

vim: Commit

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


Commit MetaInfo

Révisionb0dabd584b8f89ac32af9758c221e948016e2b0e (tree)
l'heure2007-12-10 04:26:44
Auteurvimboss
Commitervimboss

Message de Log

updated for version 7.1-175

Change Summary

Modification

diff -r 73995e7c06e6 -r b0dabd584b8f src/edit.c
--- a/src/edit.c Sun Dec 09 18:38:35 2007 +0000
+++ b/src/edit.c Sun Dec 09 19:26:44 2007 +0000
@@ -8189,6 +8189,29 @@
81898189 AppendCharToRedobuff(K_DEL);
81908190 }
81918191
8192+static void ins_bs_one __ARGS((colnr_T *vcolp));
8193+
8194+/*
8195+ * Delete one character for ins_bs().
8196+ */
8197+ static void
8198+ins_bs_one(vcolp)
8199+ colnr_T *vcolp;
8200+{
8201+ dec_cursor();
8202+ getvcol(curwin, &curwin->w_cursor, vcolp, NULL, NULL);
8203+ if (State & REPLACE_FLAG)
8204+ {
8205+ /* Don't delete characters before the insert point when in
8206+ * Replace mode */
8207+ if (curwin->w_cursor.lnum != Insstart.lnum
8208+ || curwin->w_cursor.col >= Insstart.col)
8209+ replace_do_bs();
8210+ }
8211+ else
8212+ (void)del_char(FALSE);
8213+}
8214+
81928215 /*
81938216 * Handle Backspace, delete-word and delete-line in Insert mode.
81948217 * Return TRUE when backspace was actually used.
@@ -8418,9 +8441,7 @@
84188441 int ts;
84198442 colnr_T vcol;
84208443 colnr_T want_vcol;
8421-#if 0
8422- int extra = 0;
8423-#endif
8444+ colnr_T start_vcol;
84248445
84258446 *inserted_space_p = FALSE;
84268447 if (p_sta && in_indent)
@@ -8431,6 +8452,7 @@
84318452 * 'showbreak' may get in the way, need to get the last column of
84328453 * the previous character. */
84338454 getvcol(curwin, &curwin->w_cursor, &vcol, NULL, NULL);
8455+ start_vcol = vcol;
84348456 dec_cursor();
84358457 getvcol(curwin, &curwin->w_cursor, NULL, NULL, &want_vcol);
84368458 inc_cursor();
@@ -8439,30 +8461,7 @@
84398461 /* delete characters until we are at or before want_vcol */
84408462 while (vcol > want_vcol
84418463 && (cc = *(ml_get_cursor() - 1), vim_iswhite(cc)))
8442- {
8443- dec_cursor();
8444- getvcol(curwin, &curwin->w_cursor, &vcol, NULL, NULL);
8445- if (State & REPLACE_FLAG)
8446- {
8447- /* Don't delete characters before the insert point when in
8448- * Replace mode */
8449- if (curwin->w_cursor.lnum != Insstart.lnum
8450- || curwin->w_cursor.col >= Insstart.col)
8451- {
8452-#if 0 /* what was this for? It causes problems when sw != ts. */
8453- if (State == REPLACE && (int)vcol < want_vcol)
8454- {
8455- (void)del_char(FALSE);
8456- extra = 2; /* don't pop too much */
8457- }
8458- else
8459-#endif
8460- replace_do_bs();
8461- }
8462- }
8463- else
8464- (void)del_char(FALSE);
8465- }
8464+ ins_bs_one(&vcol);
84668465
84678466 /* insert extra spaces until we are at want_vcol */
84688467 while (vcol < want_vcol)
@@ -8479,22 +8478,16 @@
84798478 #endif
84808479 {
84818480 ins_str((char_u *)" ");
8482- if ((State & REPLACE_FLAG) /* && extra <= 1 */)
8483- {
8484-#if 0
8485- if (extra)
8486- replace_push_off(NUL);
8487- else
8488-#endif
8489- replace_push(NUL);
8490- }
8491-#if 0
8492- if (extra == 2)
8493- extra = 1;
8494-#endif
8481+ if ((State & REPLACE_FLAG))
8482+ replace_push(NUL);
84958483 }
84968484 getvcol(curwin, &curwin->w_cursor, &vcol, NULL, NULL);
84978485 }
8486+
8487+ /* If we are now back where we started delete one character. Can
8488+ * happen when using 'sts' and 'linebreak'. */
8489+ if (vcol >= start_vcol)
8490+ ins_bs_one(&vcol);
84988491 }
84998492
85008493 /*
diff -r 73995e7c06e6 -r b0dabd584b8f src/version.c
--- a/src/version.c Sun Dec 09 18:38:35 2007 +0000
+++ b/src/version.c Sun Dec 09 19:26:44 2007 +0000
@@ -667,6 +667,8 @@
667667 static int included_patches[] =
668668 { /* Add new patch number below this line */
669669 /**/
670+ 175,
671+/**/
670672 174,
671673 /**/
672674 173,
Afficher sur ancien navigateur de dépôt.