From 38175254414b1aaade34152f5f819a7071586c87 Mon Sep 17 00:00:00 2001 From: jdhao Date: Fri, 29 Apr 2022 22:00:10 +0800 Subject: [PATCH] update hlslens conf --- lua/config/hlslens.lua | 6 ++++-- 1 file 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, {})