We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 9c54324 + 42e9e73 commit 0d7d546Copy full SHA for 0d7d546
lua/neominimap/window/util.lua
@@ -85,13 +85,13 @@ local function set_current_line_by_percentage(winid, row)
85
local win_h = M.win_get_true_height(winid)
86
local bufnr = api.nvim_win_get_buf(winid)
87
local line_cnt = api.nvim_buf_line_count(bufnr)
88
- local topline = math.floor(row - (row * win_h) / line_cnt)
+ local topline = math.floor(row - (row * win_h) / line_cnt) + 1
89
row = math.max(1, math.min(row, line_cnt))
90
topline = math.max(1, math.min(topline, line_cnt))
91
return function()
92
local view = vim.fn.winsaveview()
93
view.topline = topline
94
- view.lnum = row - 1
+ view.lnum = row
95
vim.fn.winrestview(view)
96
end
97
0 commit comments