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 | |
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>
-rw-r--r-- | org.eclipse.jface.text/META-INF/MANIFEST.MF | 2 | ||||
-rw-r--r-- | org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/CompletionProposalPopup.java | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/org.eclipse.jface.text/META-INF/MANIFEST.MF b/org.eclipse.jface.text/META-INF/MANIFEST.MF index 5ef31a0ea50..5d4c3885d12 100644 --- a/org.eclipse.jface.text/META-INF/MANIFEST.MF +++ b/org.eclipse.jface.text/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.eclipse.jface.text -Bundle-Version: 3.17.0.qualifier +Bundle-Version: 3.17.100.qualifier Bundle-Vendor: %providerName Bundle-Localization: plugin Export-Package: 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; |