diff options
author | Mike Krüger <mkrueger@xamarin.com> | 2017-05-09 10:48:51 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-09 10:48:51 +0300 |
commit | 2945021b1b3c4dfcf24b5989156f2dcf5eef8c8b (patch) | |
tree | a7e65c7079800ee53a891591ec1df405d1c3a948 /main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Extension | |
parent | 142427ee5ae5953c6ac51e476c652cf0fbbc9afa (diff) | |
parent | 36a99af09bd4e02d6101a02b31c9c8c76cce2dfd (diff) |
Merge pull request #2298 from mono/master-fix55706
Fixed 'Bug 55706 - CompletionTextEditorExtension.TriggerCompletion ha…
Diffstat (limited to 'main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Extension')
-rw-r--r-- | main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Extension/CompletionTextEditorExtension.cs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Extension/CompletionTextEditorExtension.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Extension/CompletionTextEditorExtension.cs index 99fecd0ea8..6e53da2cfb 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Extension/CompletionTextEditorExtension.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Extension/CompletionTextEditorExtension.cs @@ -154,8 +154,8 @@ namespace MonoDevelop.Ide.Editor.Extension return res; // Handle code completion if (descriptor.KeyChar != '\0' && CompletionWidget != null && !CompletionWindowManager.IsVisible) { - CurrentCompletionContext = CompletionWidget.CurrentCodeCompletionContext; completionTokenSrc.Cancel (); + CurrentCompletionContext = CompletionWidget.CurrentCodeCompletionContext; completionTokenSrc = new CancellationTokenSource (); var caretOffset = Editor.CaretOffset; var token = completionTokenSrc.Token; @@ -177,7 +177,7 @@ namespace MonoDevelop.Ide.Editor.Extension if (result != null) { int triggerWordLength = result.TriggerWordLength + (Editor.CaretOffset - caretOffset); if (triggerWordLength > 0 && (triggerWordLength < Editor.CaretOffset - || (triggerWordLength == 1 && Editor.CaretOffset == 1))) { + || (triggerWordLength == 1 && Editor.CaretOffset == 1))) { CurrentCompletionContext = CompletionWidget.CreateCodeCompletionContext (Editor.CaretOffset - triggerWordLength); if (result.TriggerWordStart >= 0) CurrentCompletionContext.TriggerOffset = result.TriggerWordStart; @@ -195,9 +195,7 @@ namespace MonoDevelop.Ide.Editor.Extension CurrentCompletionContext = null; } } catch (TaskCanceledException) { - CurrentCompletionContext = null; } catch (AggregateException) { - CurrentCompletionContext = null; } } |