Steps to reproduce
Type some text, with some lines extremely long, beyond the screen.
set nowrap
set foldmethod=expr
set foldexpr='>1'
You should see some lines are folded, and each of those folded lines can unfold to a single line. If not, fold all by zM
Expected behaviour
No lines become foldable.
I can see why they are foldable. If you set wrap, long lines wrap to multiple lines, so they becoming foldable is reasonable. But with set nowrap, it makes no sense to make long lines foldable, as you will be folding single line into single line.
Version of Vim
9.2 (2026 Feb 14) included patches 1-849
Environment
Arch Linux
Logs and stack traces
Steps to reproduce
Type some text, with some lines extremely long, beyond the screen.
You should see some lines are folded, and each of those folded lines can unfold to a single line. If not, fold all by
zMExpected behaviour
No lines become foldable.
I can see why they are foldable. If you set wrap, long lines wrap to multiple lines, so they becoming foldable is reasonable. But with set nowrap, it makes no sense to make long lines foldable, as you will be folding single line into single line.
Version of Vim
9.2 (2026 Feb 14) included patches 1-849
Environment
Arch Linux
Logs and stack traces