From a2477fd3490c1166522631eee53c57d34321086a Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sat, 3 Dec 2016 15:13:20 +0100 Subject: patch 8.0.0121 Problem: Setting 'cursorline' changes the curswant column. (Daniel Hahler) Solution: Add the P_RWINONLY flag. (closes #1297) --- src/testdir/test_goto.vim | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/testdir/test_goto.vim') diff --git a/src/testdir/test_goto.vim b/src/testdir/test_goto.vim index d0daeeb76..257340170 100644 --- a/src/testdir/test_goto.vim +++ b/src/testdir/test_goto.vim @@ -273,3 +273,18 @@ func Test_gd_string_only() \ ] call XTest_goto_decl('gd', lines, 5, 10) endfunc + +" Check that setting 'cursorline' does not change curswant +func Test_cursorline_keep_col() + new + call setline(1, ['long long long line', 'short line']) + normal ggfi + let pos = getcurpos() + normal j + set cursorline + normal k + call assert_equal(pos, getcurpos()) + bwipe! + set nocursorline +endfunc + -- cgit v1.2.3