vim-patch:9.1.0667: Some other options reset curswant unnecessarily when set (#30020)

Problem:  Some other options reset curswant unnecessarily when set.
          (Andrew Haust)
Solution: Don't reset curswant when setting 'comments', 'commentstring'
          or 'define' (zeertzjq)

fixes: vim/vim#15462
closes: vim/vim#15467

b026a293b1
(cherry picked from commit 0ec43cb4b5)
This commit is contained in:
zeertzjq
2024-08-10 16:05:30 +08:00
committed by github-actions[bot]
parent 4552a9629a
commit 9f8a5cd022
2 changed files with 2 additions and 3 deletions

View File

@@ -322,6 +322,7 @@ func Test_set_options_keep_col()
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 @@ func Test_set_options_keep_col()
bwipe!
set hlsearch& spell& spelllang& spelloptions& textwidth&
set cursorline& cursorcolumn& cursorlineopt& colorcolumn& winfixbuf&
set comments& commentstring& define&
set background&
endfunc