mirror of
https://github.com/NotAShelf/specs.nvim.git
synced 2024-12-27 21:22:24 +00:00
Merge pull request #19 from aileot/fix/calc-in-apparent-height
Fix: get jump distance in apparent cursor height
This commit is contained in:
commit
6fbdb0fe1f
1 changed files with 2 additions and 2 deletions
|
@ -5,9 +5,9 @@ local old_cur
|
||||||
local au_toggle
|
local au_toggle
|
||||||
|
|
||||||
function M.on_cursor_moved()
|
function M.on_cursor_moved()
|
||||||
local cur = vim.api.nvim_win_get_cursor(0)
|
local cur = vim.fn.winline() + vim.api.nvim_win_get_position(0)[1]
|
||||||
if old_cur then
|
if old_cur then
|
||||||
local jump = math.abs(cur[1]-old_cur[1])
|
local jump = math.abs(cur-old_cur)
|
||||||
if jump >= opts.min_jump then
|
if jump >= opts.min_jump then
|
||||||
M.show_specs()
|
M.show_specs()
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue