File tree Expand file tree Collapse file tree 3 files changed +8
-3
lines changed
Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -3763,7 +3763,9 @@ if api.nvim_create_autocmd ~= nil then
37633763 return
37643764 end
37653765 local cmdline = fn .getcmdline ()
3766- if string.match (cmdline , ' ^%d*winc' ) ~= nil then
3766+ -- Remove the leading non-alphabetic characters (count and spaces).
3767+ cmdline = cmdline :gsub (' ^[^%a]*' , ' ' )
3768+ if vim .startswith (cmdline , ' winc' ) then
37673769 refresh_impl_async ()
37683770 end
37693771 end
Original file line number Diff line number Diff line change @@ -88,12 +88,13 @@ function M.init(enable)
8888 -- :[range]k{a-zA-Z'}
8989 -- :delm[arks] {marks}
9090 -- :kee[pmarks] {command}
91- -- WARN: [range] is not handled.
9291 -- WARN: Only text at the beginning of the command is considered.
9392 -- WARN: CmdlineLeave is not executed for command mappings (<cmd>).
9493 -- WARN: CmdlineLeave is not executed for commands executed from Lua
9594 -- (e.g., vim.cmd('help')).
9695 local cmdline = fn .getcmdline ()
96+ -- Remove the leading non-alphabetic characters (range and spaces).
97+ cmdline = cmdline :gsub (' ^[^%a]*' , ' ' )
9798 if vim .startswith (cmdline , ' ma' )
9899 or vim .startswith (cmdline , ' k' )
99100 or vim .startswith (cmdline , ' delm' )
Original file line number Diff line number Diff line change @@ -109,7 +109,9 @@ function M.init(enable)
109109 -- WARN: CmdlineLeave is not executed for commands executed from Lua
110110 -- (e.g., vim.cmd('help')).
111111 local cmdline = fn .getcmdline ()
112- if string.match (cmdline , ' ^%d*spe' ) ~= nil then
112+ -- Remove the leading non-alphabetic characters (count and spaces).
113+ cmdline = cmdline :gsub (' ^[^%a]*' , ' ' )
114+ if vim .startswith (cmdline , ' spe' ) then
113115 invalidate_cache ()
114116 scrollview .refresh ()
115117 end
You can’t perform that action at this time.
0 commit comments