summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_popupwin.vim
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 07:39:41 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 07:39:41 +0000
commit00c068502d170f9f9b59c4a68aa12e8835859f6c (patch)
tree2047fc01b8c70326d9b87b47a575e7e5f2141b62 /src/testdir/test_popupwin.vim
parentAdding upstream version 2:9.1.0016. (diff)
downloadvim-00c068502d170f9f9b59c4a68aa12e8835859f6c.tar.xz
vim-00c068502d170f9f9b59c4a68aa12e8835859f6c.zip
Adding upstream version 2:9.1.0199.upstream/2%9.1.0199
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/testdir/test_popupwin.vim')
-rw-r--r--src/testdir/test_popupwin.vim18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/testdir/test_popupwin.vim b/src/testdir/test_popupwin.vim
index c20ff48..a397f70 100644
--- a/src/testdir/test_popupwin.vim
+++ b/src/testdir/test_popupwin.vim
@@ -4215,4 +4215,22 @@ func Test_popup_close_callback_recursive()
set maxfuncdepth&
endfunc
+func Test_popupwin_setbufvar_changing_window_view()
+ " Test for Github Issue https://github.com/vim/vim/issues/13863
+ " using setbufvar(buf, '&option') should not scroll
+ " the current window
+ 20new
+ call append(0, range(1, 25))
+ setlocal scrollbind
+ norm! G
+ let topline = winsaveview()['topline']
+ call setbufvar(winbufnr(popup_atcursor(['foobar'], {})), '&syntax', 'python')
+ " close popup
+ call popup_clear()
+ call assert_equal(topline, winsaveview()['topline'])
+
+ " clean up
+ bw!
+endfunc
+
" vim: shiftwidth=2 sts=2