aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjdhao <jdhao@hotmail.com>2022-04-29 22:00:10 +0800
committerjdhao <jdhao@hotmail.com>2022-04-29 22:00:10 +0800
commit38175254414b1aaade34152f5f819a7071586c87 (patch)
tree7f613bd03d264e3f41d418c3d2bbecb24f060e91
parent4b4331d3940e2494e3e4373e740d5cd26b7646fa (diff)
update hlslens conf
-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, {})