Skip to content

Commit

Permalink
fix(jump): call add-offset! before redrawing the cursor
Browse files Browse the repository at this point in the history
  • Loading branch information
ggandor committed May 10, 2024
1 parent f1f19fc commit be68eec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion fnl/leap/jump.fnl
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ the API), make the motion appear to behave as an inclusive one."
(api.nvim_set_current_win winid))

(api.nvim_win_set_cursor 0 [lnum (- col 1)]) ; (1,1) -> (1,0)
(when offset (add-offset! offset))
(pcall api.nvim__redraw {:cursor true}) ; EXPERIMENTAL

(when offset (add-offset! offset))
; Since Vim interprets our jump as an exclusive motion (:h exclusive),
; we need custom tweaks to behave as an inclusive one. (This is only
; relevant in the forward direction, as inclusiveness applies to the
Expand Down
2 changes: 1 addition & 1 deletion lua/leap/jump.lua

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 comment on commit be68eec

@awerebea
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! Thanks!

Please sign in to comment.