patch 9.1.0667: Some other options reset curswant unnecessarily when set
Problem: Some other options reset curswant unnecessarily when set.
(Andrew Haust)
Solution: Don't reset curswant when setting 'comments', 'commentstring'
or 'define' (zeertzjq)
fixes: #15462
closes: #15467
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/testdir/test_goto.vim b/src/testdir/test_goto.vim
index 8813bcb..b6a6695 100644
--- a/src/testdir/test_goto.vim
+++ b/src/testdir/test_goto.vim
@@ -322,6 +322,7 @@
normal j
set invhlsearch spell spelllang=en,cjk spelloptions=camel textwidth=80
set cursorline cursorcolumn cursorlineopt=line colorcolumn=+1 winfixbuf
+ set comments=:# commentstring=#%s define=function
set background=dark
set background=light
normal k
@@ -329,6 +330,7 @@
bwipe!
set hlsearch& spell& spelllang& spelloptions& textwidth&
set cursorline& cursorcolumn& cursorlineopt& colorcolumn& winfixbuf&
+ set comments& commentstring& define&
set background&
endfunc