Skip to content

Failed "z=" changing 'nospell'#19525

Closed
luukvbaal wants to merge 1 commit intovim:masterfrom
luukvbaal:spellsuggest
Closed

Failed "z=" changing 'nospell'#19525
luukvbaal wants to merge 1 commit intovim:masterfrom
luukvbaal:spellsuggest

Conversation

@luukvbaal
Copy link
Contributor

Problem: When z= fails due to no word being found, 'spelllang' being
unset or a multiline visual selection, 'nospell' is not
restored.
Solution: Jump to where the user configured value of 'spell' is restored
instead of returning early.

Ref neovim/neovim#38094

@chrisbra
Copy link
Member

chrisbra commented Feb 27, 2026

Thanks, but what is the reason to introduce a new local variable curline? Oh and it breaks an existing test?

Problem:  When z= fails due to no word being found, 'spelllang' being
          unset or a multiline visual selection, 'nospell' is not
          restored.
Solution: Jump to where the user configured value of 'spell' is restored
          instead of returning early.
@luukvbaal
Copy link
Contributor Author

luukvbaal commented Feb 27, 2026

Introduced curline to keep line == NULL, so that the existing skip label can be used without free problems. Alternatively could add a new label or just restore it manually before the returns.

The failing test relies on "z=" setting 'spell', updated to set it explicitly.

@chrisbra
Copy link
Member

Ah that makes sense. Thanks

@chrisbra chrisbra closed this in eba078f Feb 28, 2026
luukvbaal added a commit to luukvbaal/neovim that referenced this pull request Feb 28, 2026
Problem:  When z= fails due to no word being found, 'spelllang' being
          unset or a multiline visual selection, 'nospell' is not
          restored.
Solution: Jump to where the user configured value of 'spell' is restored
          instead of returning early (Luuk van Baal).

closes: vim/vim#19525

vim/vim@eba078f
luukvbaal added a commit to luukvbaal/neovim that referenced this pull request Feb 28, 2026
Problem:  When z= fails due to no word being found, 'spelllang' being
          unset or a multiline visual selection, 'nospell' is not
          restored.
Solution: Jump to where the user configured value of 'spell' is restored
          instead of returning early (Luuk van Baal).

closes: vim/vim#19525

vim/vim@eba078f
luukvbaal added a commit to neovim/neovim that referenced this pull request Mar 1, 2026
)

Problem:  When z= fails due to no word being found, 'spelllang' being
          unset or a multiline visual selection, 'nospell' is not
          restored.
Solution: Jump to where the user configured value of 'spell' is restored
          instead of returning early (Luuk van Baal).

closes: vim/vim#19525

vim/vim@eba078f
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