-
Notifications
You must be signed in to change notification settings - Fork 0
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
[CLOSED] Editor options set on hidden editors when switching files #5980
Comments
Good points! Thanks for the suggestions |
I think the _instances.forEach is there because of the inline editors, since you need to change both the visible Editor and all the Inline Editors that point to the currently viewed file. But still better than doing it for all the editors. |
Btw, I just realized that split-views will make this a much more pressing bug, because then one of the editors that shouldn't get updated will still be in view. In certain cases, this could make the indentation jump around as the editor gains/loses focus... |
Hmm, I actually just realized my "split-views" scenario with indent levels visibly jumping around can happen already in the case of inline editors. Nominating for Sprint 37 for that reason. Fyi |
Bumping to medium priority. |
Making a note of a suggestion that Peter had for clearing up some cases that are a little off with the new preferences model:
My thinking is to automatically set a "project" Scope that is the same object as the "path" scope. Requesting CURRENT_PROJECT values would change the scopeOrder to session, project, user, default. |
Something to note is that |
One addition to the note above: in most common practice this will not be an issue. Preferences for the current project will generally be in hand already, but I thought it was worth mentioning. The impact would specifically be for files external to the project that do have a preference file in the file tree above them somewhere. |
FBNC back to |
Saturday Jan 18, 2014 at 01:58 GMT
Originally opened as adobe/brackets#6578
_setEditorOption()
in the Editor moduleResult:
setOption()
gets called on every Editor instance that exists, setting them all to use codemirror.js's tab settings. When to switch away from codemirror.js,setOption()
gets called on all of them again to restore the setting (and also, mirroring this, the now-hidden codemirror.js is set to the 'wrong' setting).This seems inefficient... and you could maybe even imagine some prefs where temporarily applying a different setting isn't 100% non-destructive.
Expected:
Only the visible editor (the editor to whose path the setting actually applies) gets the change event.
Or better yet, when the editor is new'ed up, it's constructed with the right path-appropriate settings to begin with and no change events are processed. (Though then we'd need a way to distinguish ignored change events due to path context from change events due to the user changing a setting, which we still couldn't ignore).
Low priority
@
dangoor as food for thought...The text was updated successfully, but these errors were encountered: