diff options
author | Bram Moolenaar <bram@vim.org> | 2013-02-06 12:33:21 +0100 |
---|---|---|
committer | Bram Moolenaar <bram@vim.org> | 2013-02-06 12:33:21 +0100 |
commit | ccff586c1717697c5a24f508d8c15618919b1298 (patch) | |
tree | 8d9e491c79a7f123faa94f872ed474b92d1d4bb4 | |
parent | c933f28d5101da7d6cc6a35e18f69708ab269e84 (diff) | |
download | vim-7.3.800.tar.gz |
Problem: The " mark is not adjusted when inserting lines. (Roland Eggner)
Solution: Adjust the line number. (Christian Brabandt)
-rw-r--r-- | src/mark.c | 6 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 8 insertions, 0 deletions
@@ -1047,6 +1047,7 @@ mark_adjust(line1, line2, amount, amount_after) #ifdef FEAT_WINDOWS tabpage_T *tab; #endif + static pos_T initpos = INIT_POS_T(1, 0, 0); if (line2 < line1 && amount_after == 0L) /* nothing to do */ return; @@ -1072,6 +1073,11 @@ mark_adjust(line1, line2, amount, amount_after) /* last change position */ one_adjust(&(curbuf->b_last_change.lnum)); + /* last cursor position, if it was set */ + if (!equalpos(curbuf->b_last_cursor, initpos)) + one_adjust(&(curbuf->b_last_cursor.lnum)); + + #ifdef FEAT_JUMPLIST /* list of change positions */ for (i = 0; i < curbuf->b_changelistlen; ++i) diff --git a/src/version.c b/src/version.c index 7689b560..af8210a9 100644 --- a/src/version.c +++ b/src/version.c @@ -726,6 +726,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 800, +/**/ 799, /**/ 798, |