Skip to content

Keep window size in window position check - #36

Merged
simeji merged 2 commits into
simeji:masterfrom
KSR-Yasuda:bugfix/KeepWinSizeInWinPosCheck
Mar 28, 2026
Merged

Keep window size in window position check#36
simeji merged 2 commits into
simeji:masterfrom
KSR-Yasuda:bugfix/KeepWinSizeInWinPosCheck

Conversation

@KSR-Yasuda

@KSR-Yasuda KSR-Yasuda commented May 10, 2023

Copy link
Copy Markdown
Contributor

On switching current window in window-focus mode,
it checks movable direction by trying wincmd {h,j,k,l}.

It switches current window, so, if the window size is smaller than &winwidth and &winheight,
the window is resized.

The setting &winwidth is 20 by default, so vertically small window is likely to be resized.

Procedure to Repro

  1. :set winwidth=20
  2. :below vsplit
  3. :wincmd | (Change the other window size smaller than &winwidth)
  4. Launch winresizer (Ctrl-q)
  5. Switch to window-focus mode (f)

KSR-Yasuda and others added 2 commits May 10, 2023 16:37
The restore expression was missing a '.' before ' winheight=', so
winheight was never actually restored.
@simeji

simeji commented Mar 28, 2026

Copy link
Copy Markdown
Owner

Thank you for this fix! Temporarily setting winwidth=1 winheight=1 during the movability check is a clean solution.

I noticed a small bug in the restore line — a . was missing in the string concatenation, which meant winheight was never actually restored. Fixed that before merging.

@simeji
simeji merged commit c201cd0 into simeji:master Mar 28, 2026
1 check passed
@KSR-Yasuda
KSR-Yasuda deleted the bugfix/KeepWinSizeInWinPosCheck branch March 30, 2026 00:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants