[vim] Create popup terminal at its final size

Vim created the terminal at the current window size and resized it at the
next redraw. On Windows, fzf missed the resize when that redraw was delayed
and kept its initial layout.

Patch suggested by @FanXiangTM

Fix #4957
This commit is contained in:
Junegunn Choi 2026-11-19 23:07:41 +09:00
parent eea2081857
commit bf4869b7fa
No known key found for this signature in database
GPG key ID: D9770615D226D94C
2 changed files with 5 additions and 0 deletions

View file

@ -5,6 +5,7 @@ CHANGELOG
------
- Fixed `--info inline-right:PREFIX` leaving part of the previous output when the info gets shorter (#4953)
- Fixed a one-line picker overwriting the line above it, e.g. `--height=~50%` with inline info and empty input (#4958) (@nhooyr)
- [vim] Fixed the popup window being cropped on Windows when the first redraw after starting the terminal is delayed (#4957) (@FanXiangTM)
0.75.0
------

View file

@ -1124,6 +1124,10 @@ function! s:execute_term(dict, command, temps) abort
endif
if is_popup
let term_opts.hidden = 1
" Avoid resizing the terminal after fzf starts (#4957)
let bounds = s:popup_bounds()
let term_opts.term_rows = bounds.height
let term_opts.term_cols = bounds.width
else
let term_opts.curwin = 1
endif