Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

fix issues when cursor on empty line (#351) #358

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lua/hop/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down