Skip to content
This repository has been archived by the owner on Sep 2, 2021. It is now read-only.

Fix sync issues when accepting code hint in inline editor #20

Merged
merged 2 commits into from
Sep 19, 2012

Conversation

njx
Copy link

@njx njx commented Sep 19, 2012

Because of adobe/brackets#1688, there is a general bug where edits in a master editor during an operation started in an inline editor cause syncing problems. This happens in the case of EWF code hints as described in #19. In this scenario, when the user hits enter in the code hint menu in an inline editor, the onKeyDown event starts an outer CodeMirror operation(), but EWF then edits the underlying document, which is really the master editor (not the inline editor). This hits the case described in adobe/brackets#1688.

The workaround for now is to simply make it so EWF does its edit in the editor it was called from, not the underlying document. It seems relatively safe and doesn't require changes to core Brackets code.

Narciso Jaramillo added 2 commits September 18, 2012 16:56
@ghost ghost assigned gruehle Sep 19, 2012
@njx
Copy link
Author

njx commented Sep 19, 2012

@gruehle @peterflynn Please take a look.

@gruehle
Copy link
Member

gruehle commented Sep 19, 2012

Looks like the safest change for now. I tested with both inline editors and main editors, and everything worked fine. Merging.

gruehle added a commit that referenced this pull request Sep 19, 2012
Fix sync issues when accepting code hint in inline editor
@gruehle gruehle merged commit 344f887 into master Sep 19, 2012
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants