Skip to content

Commit

Permalink
fix(list): possible wrong height with winbar enabled
Browse files Browse the repository at this point in the history
winheight() get wrong height on neovim when there is winbar, use
nvim_win_get_height() instead

Closes #4555
  • Loading branch information
chemzqm committed Sep 1, 2023
1 parent 09e0c00 commit 0c2c64c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/list/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export default class ListSession {
this.cwd = workspace.cwd
this.hidden = false
let { listArgs } = this
let res = await this.nvim.eval('[win_getid(),bufnr("%"),winheight("%")]')
let res = await this.nvim.eval(`[win_getid(),bufnr("%"),${workspace.isVim ? 'winheight("%")' : 'nvim_win_get_height(0)'}]`)
this.listArgs = listArgs
this.history.filter()
this.targetWinid = res[0]
Expand Down

0 comments on commit 0c2c64c

Please sign in to comment.