summaryrefslogtreecommitdiff
path: root/src/testdir/test_goto.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-12-03 15:13:20 +0100
committerBram Moolenaar <Bram@vim.org>2016-12-03 15:13:20 +0100
commita2477fd3490c1166522631eee53c57d34321086a (patch)
tree0d5b40678aa1e56e026784e911651e7b1293c52f /src/testdir/test_goto.vim
parent5643db84c6a9f15d14492cefd52647623aa2ac7c (diff)
downloadvim-a2477fd3490c1166522631eee53c57d34321086a.zip
patch 8.0.0121
Problem: Setting 'cursorline' changes the curswant column. (Daniel Hahler) Solution: Add the P_RWINONLY flag. (closes #1297)
Diffstat (limited to 'src/testdir/test_goto.vim')
-rw-r--r--src/testdir/test_goto.vim15
1 files changed, 15 insertions, 0 deletions
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
+