From f095a9ed49d68ec590ba7a4c599fe94cd5c76696 Mon Sep 17 00:00:00 2001 From: yanshay Date: Sat, 8 Apr 2023 12:15:09 +0300 Subject: [PATCH] fix issues when cursor on empty line (#351) --- lua/hop/init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/hop/init.lua b/lua/hop/init.lua index 32027e5a..94ddf89e 100644 --- a/lua/hop/init.lua +++ b/lua/hop/init.lua @@ -120,13 +120,13 @@ local function set_unmatched_lines(buf_handle, hl_ns, top_line, bottom_line, cur local current_width = vim.fn.strdisplaywidth(current_line) if end_col > current_width then - end_col = current_width - 1 + end_col = current_width end extmark_options.end_col = end_col end - vim.api.nvim_buf_set_extmark(buf_handle, hl_ns, start_line, start_col, + vim.api.nvim_buf_set_extmark(buf_handle, hl_ns, start_line, start_col - 1, extmark_options) end