aboutsummaryrefslogtreecommitdiff
path: root/lua/config/hlslens.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/config/hlslens.lua')
-rw-r--r--lua/config/hlslens.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/lua/config/hlslens.lua b/lua/config/hlslens.lua
index bf02aa6..cacac56 100644
--- a/lua/config/hlslens.lua
+++ b/lua/config/hlslens.lua
@@ -3,9 +3,11 @@ require('hlslens').setup({
nearest_only = true,
})
-local activate_hlslens = function(d)
- local cmd = "normal! " .. vim.v.count1 .. d .. "zzzv"
+local activate_hlslens = function(direction)
+ local cmd = string.format("normal! %s%szzzv", vim.v.count1, direction)
local status, msg = pcall(vim.fn.execute, cmd)
+ -- 13 is the index where real error message starts
+ msg = msg:sub(13)
if not status then
vim.api.nvim_echo({{msg, "ErrorMsg"}}, false, {})