From e43e49a6216db9e3bd2883fbaf62bf92479f7043 Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Mon, 30 Mar 2009 20:33:05 +0000 Subject: [PATCH] Allow opening a new code completion window inside ICompletionList.Complete() method. git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@3942 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- .../DisplayBindings/AvalonEdit.AddIn/Src/CodeEditor.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/CodeEditor.cs b/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/CodeEditor.cs index 4456814e4a..dd02408454 100644 --- a/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/CodeEditor.cs +++ b/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/CodeEditor.cs @@ -147,8 +147,14 @@ namespace ICSharpCode.AvalonEdit.AddIn internal void NotifyCompletionWindowOpened(CompletionWindow window) { + if (completionWindow != null) { + // if there already is a completion window open, close it + completionWindow.Close(); + } completionWindow = window; - window.Closed += delegate { completionWindow = null; }; + window.Closed += delegate { + completionWindow = null; + }; } IFormattingStrategy formattingStrategy;