aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-02-04 18:47:20 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-02-04 18:47:20 +0800
commitab7ae8806e907c7238e5379f6d0eeb4d62277759 (patch)
tree6d29fb8dc6f5b7252dbc2ba02ec9873f182a177c /src/nvim/testdir
parentb9def4ae10dc77d16786d99e2814033c02178e63 (diff)
downloadrneovim-ab7ae8806e907c7238e5379f6d0eeb4d62277759.tar.gz
rneovim-ab7ae8806e907c7238e5379f6d0eeb4d62277759.tar.bz2
rneovim-ab7ae8806e907c7238e5379f6d0eeb4d62277759.zip
vim-patch:8.2.3583: the "gd" and "gD" commands do not update search stats
Problem: The "gd" and "gD" commands do not update search stats. (Gary Johnson) Solution: Clear search stats. https://github.com/vim/vim/commit/0c71114aede81a209b7efc126b4bf19f11d58955
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_search_stat.vim25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_search_stat.vim b/src/nvim/testdir/test_search_stat.vim
index 015771a3bb..d950626615 100644
--- a/src/nvim/testdir/test_search_stat.vim
+++ b/src/nvim/testdir/test_search_stat.vim
@@ -347,4 +347,29 @@ func! Test_search_stat_screendump()
call delete('Xsearchstat')
endfunc
+func Test_search_stat_then_gd()
+ CheckScreendump
+
+ let lines =<< trim END
+ call setline(1, ['int cat;', 'int dog;', 'cat = dog;'])
+ set shortmess-=S
+ set hlsearch
+ END
+ call writefile(lines, 'Xsearchstatgd')
+
+ let buf = RunVimInTerminal('-S Xsearchstatgd', #{rows: 10})
+ call term_sendkeys(buf, "/dog\<CR>")
+ call TermWait(buf)
+ call VerifyScreenDump(buf, 'Test_searchstatgd_1', {})
+
+ call term_sendkeys(buf, "G0gD")
+ call TermWait(buf)
+ call VerifyScreenDump(buf, 'Test_searchstatgd_2', {})
+
+ call StopVimInTerminal(buf)
+ call delete('Xsearchstatgd')
+endfunc
+
+
+
" vim: shiftwidth=2 sts=2 expandtab