Skip to content

Commit d9dce16

Browse files
hexh250786313hexh
andauthored
fix(list): CocListResume get wrong height (#4765)
Co-authored-by: hexh <[email protected]>
1 parent 2a73b9d commit d9dce16

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/list/session.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ export default class ListSession {
478478

479479
public async resume(): Promise<void> {
480480
if (this.winid) await this.hide()
481-
let res = await this.nvim.eval('[win_getid(),bufnr("%"),winheight("%")]')
481+
let res = await this.nvim.eval(`[win_getid(),bufnr("%"),${workspace.isVim ? 'winheight("%")' : 'nvim_win_get_height(0)'}]`)
482482
this.hidden = false
483483
this.targetWinid = res[0]
484484
this.targetBufnr = res[1]

0 commit comments

Comments
 (0)