[vim/vim] fold size is compared against 'foldminlines' of the wrong window (PR #20864)

Igor Mikushkin (Vim Github Repository) <[email protected]> Tue, 28 Jul 2026 12:48:05 -0700
Newsgroups gmane.editors.vim.devel
Message-ID <vim/vim/pull/[email protected]>
### Problem
checkSmall() compares the fold size of window `wp` against the current window's `foldminlines`.  A fold of another window, e.g. measured while it is redrawn, is judged by an unrelated option value.

### Solution:
Use `foldminlines` of the window containing the fold
You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/20864

-- Commit Summary --

  * fold size is compared against 'foldminlines' of the wrong window

-- File Changes --

    M src/fold.c (4)
    M src/testdir/test_fold.vim (38)

-- Patch Links --

https://github.com/vim/vim/pull/20864.patch
https://github.com/vim/vim/pull/20864.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/vim/vim/pull/20864
You are receiving this because you are subscribed to this thread.

Message ID: <vim/vim/pull/[email protected]>

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion visit https://groups.google.com/d/msgid/vim_dev/vim/vim/pull/20864%40github.com.