diff options
author | Mickael Istria | 2021-03-04 09:27:57 +0000 |
---|---|---|
committer | Mickael Istria | 2021-03-09 09:18:57 +0000 |
commit | 632ff61f200bda9a00311a19828bd199fef65df3 (patch) | |
tree | 5a6978007a0a774b10e14f035f29c6a75cefe61b /org.eclipse.jface.text/src | |
parent | af812420d776d07d3d891f481553743e8f7e0784 (diff) | |
download | eclipse.platform.text-632ff61f200bda9a00311a19828bd199fef65df3.tar.gz eclipse.platform.text-632ff61f200bda9a00311a19828bd199fef65df3.tar.xz eclipse.platform.text-632ff61f200bda9a00311a19828bd199fef65df3.zip |
Bug 569668 - completion insertion corrupted by concurrent editsI20210310-0620I20210310-0250
Ignore keys while a completion proposal is being inserted.
Change-Id: I68d421db337d2771e40a8da4a070ba270f26035c
Signed-off-by: Mickael Istria <mistria@redhat.com>
Diffstat (limited to 'org.eclipse.jface.text/src')
-rw-r--r-- | org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/CompletionProposalPopup.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/CompletionProposalPopup.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/CompletionProposalPopup.java index dcadb6e23f6..3e345ce3ea7 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/CompletionProposalPopup.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/CompletionProposalPopup.java @@ -959,7 +959,6 @@ class CompletionProposalPopup implements IContentAssistListener { * @since 2.1 */ void insertProposal(ICompletionProposal p, char trigger, int stateMask, final int offset) { - fInserting= true; IRewriteTarget target= null; IEditingSupport helper= new IEditingSupport() { @@ -977,9 +976,7 @@ class CompletionProposalPopup implements IContentAssistListener { }; try { - IDocument document= fContentAssistSubjectControlAdapter.getDocument(); - if (fViewer instanceof ITextViewerExtension) { ITextViewerExtension extension= (ITextViewerExtension) fViewer; target= extension.getRewriteTarget(); @@ -1300,6 +1297,10 @@ class CompletionProposalPopup implements IContentAssistListener { @Override public boolean verifyKey(VerifyEvent e) { + if (fInserting) { + return false; + } + if (!isValid(fProposalShell)) return true; |