From e498f265f46355ab782bfd87b6c85467da2845e3 Mon Sep 17 00:00:00 2001 From: shadmansaleh Date: Tue, 20 Apr 2021 12:31:03 +0600 Subject: vim-patch:8.2.0877: cannot get the search statistics Problem: Cannot get the search statistics. Solution: Add the searchcount() function. (Fujiwara Takuya, closes vim/vim#4446) https://github.com/vim/vim/commit/e8f5ec0d30b629d7166f0ad03434065d8bc822df Additional changes: - Tests weren't passing because the test ran assuming the cursor was at start of buffer but append() left the cursor at end of buffer . So cursor is moved to start of buffer after append. - searchcount() added to list of builtin functions. --- src/nvim/eval.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'src/nvim/eval.lua') diff --git a/src/nvim/eval.lua b/src/nvim/eval.lua index 148804e54c..dcf3821e7d 100644 --- a/src/nvim/eval.lua +++ b/src/nvim/eval.lua @@ -286,6 +286,7 @@ return { screenpos={args=3}, screenrow={}, search={args={1, 4}}, + searchcount={args={0,1}}, searchdecl={args={1, 3}}, searchpair={args={3, 7}}, searchpairpos={args={3, 7}}, -- cgit