Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only notify option change to initialised editors #832

Merged
merged 3 commits into from
Feb 23, 2024

Conversation

citizenmatt
Copy link
Member

This PR ensures that IdeaVim only works with editors that have been initialised. This is important for various callbacks, such as notifications when setting editor options.

For example, the ~/.ideavimrc file is evaluated during startup, before other editors are initialised. It can set various option values which in turn notify all affected editors. If the IDE opens editors at startup, these editors would be notified of changes before they've been initialised. VIM-3256 is an example of an issue caused by this - the uninitialised editors are notified, and try to check local-to-buffer options. These local-to-buffer options haven't yet been initialised, but trying to get a value will create the storage map for them, without setting any values. Subsequent attempts to use local-to-buffer options (such as 'keyword') can result in an assert.

The fact that these methods only return local editors (i.e., editors for the local user while hosting a Code With Me session) is an implementation detail
@AlexPl292 AlexPl292 merged commit bc80840 into JetBrains:master Feb 23, 2024
4 checks passed
@AlexPl292
Copy link
Member

Awesome, thank you!

@citizenmatt citizenmatt deleted the bugfix/options-initialisation branch February 23, 2024 16:23
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