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 | b6a76ffc4cc79163c88b734e0a803385321b3ca6 (patch) | |
tree | 3a46c1ea68af9f17cc87f532c7ed01dc259aeb03 /src/mark.c | |
parent | 9c2e6cc6edb939828032c9179fe05b57fa84a384 (diff) | |
download | vim-git-b6a76ffc4cc79163c88b734e0a803385321b3ca6.tar.gz |
updated for version 7.3.800v7.3.800
Problem: The " mark is not adjusted when inserting lines. (Roland Eggner)
Solution: Adjust the line number. (Christian Brabandt)
Diffstat (limited to 'src/mark.c')
-rw-r--r-- | src/mark.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mark.c b/src/mark.c index 540f70b97..f31f53b52 100644 --- a/src/mark.c +++ b/src/mark.c @@ -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) |