Skip to content

Commit 020e96f

Browse files
authored
Merge pull request #16 from aidancz/main
use screen line instead of logical line
2 parents 5c5fcdf + 1cf5835 commit 020e96f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lua/go-up/internals.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ M.centerScreen = function()
3838
vim.cmd('normal! zz')
3939

4040
-- get the line the cursor is on
41-
local currentLine = vim.fn.line('.')
42-
local topLine = vim.fn.line('w0')
41+
local currentLine = vim.fn.winline()
42+
local topLine = 1
4343

4444
-- get information about the current window
4545
local windowHeight = vim.api.nvim_win_get_height(0)

0 commit comments

Comments
 (0)