Patch 8.2.3532
Problem: The previous '' mark is restored after moving the cursor to the
original jump position. (Tony Chen)
Solution: Forget the previous position after checking. (closes #8985)
Files: src/mark.c, src/testdir/test_marks.vim
*** ../vim-8.2.3531/src/mark.c 2021-07-27 21:00:39.745712396 +0100
--- src/mark.c 2021-10-17 21:47:30.286782385 +0100
***************
*** 181,190 ****
if (curwin->w_prev_pcmark.lnum != 0
&& (EQUAL_POS(curwin->w_pcmark, curwin->w_cursor)
|| curwin->w_pcmark.lnum == 0))
- {
curwin->w_pcmark = curwin->w_prev_pcmark;
! curwin->w_prev_pcmark.lnum = 0; // Show it has been checked
! }
}
#if defined(FEAT_JUMPLIST) || defined(PROTO)
--- 181,188 ----
if (curwin->w_prev_pcmark.lnum != 0
&& (EQUAL_POS(curwin->w_pcmark, curwin->w_cursor)
|| curwin->w_pcmark.lnum == 0))
curwin->w_pcmark = curwin->w_prev_pcmark;
! curwin->w_prev_pcmark.lnum = 0; // it has been checked
}
#if defined(FEAT_JUMPLIST) || defined(PROTO)
*** ../vim-8.2.3531/src/testdir/test_marks.vim 2020-08-12 17:50:31.879655802
+0100
--- src/testdir/test_marks.vim 2021-10-17 21:46:49.298151033 +0100
***************
*** 26,31 ****
--- 26,41 ----
enew!
endfunc
+ func Test_previous_jump_mark()
+ new
+ call setline(1, ['']->repeat(6))
+ normal Ggg
+ call assert_equal(6, getpos("''")[1])
+ normal jjjjj
+ call assert_equal(6, getpos("''")[1])
+ bwipe!
+ endfunc
+
func Test_setpos()
new Xone
let onebuf = bufnr('%')
*** ../vim-8.2.3531/src/version.c 2021-10-17 18:05:23.070999569 +0100
--- src/version.c 2021-10-17 21:42:53.490624127 +0100
***************
*** 759,760 ****
--- 759,762 ----
{ /* Add new patch number below this line */
+ /**/
+ 3532,
/**/
--
hundred-and-one symptoms of being an internet addict:
181. You still remember the "happy tune" your modem made
while dialing your ISP.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/20211017205437.313F7C80053%40moolenaar.net.