[Monodevelop-patches-list] r1427 - in trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor: . CodeCompletion Gui
commit-watcher at mono-cvs.ximian.com
commit-watcher at mono-cvs.ximian.com
Fri Apr 9 19:07:20 EDT 2004
Author: tberman
Date: 2004-04-09 19:07:20 -0400 (Fri, 09 Apr 2004)
New Revision: 1427
Modified:
trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/ChangeLog
trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CompletionWindow.cs
trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorBuffer.cs
Log:
fix ben's first bug in a while :)
Modified: trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/ChangeLog
===================================================================
--- trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/ChangeLog 2004-04-09 22:00:39 UTC (rev 1426)
+++ trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/ChangeLog 2004-04-09 23:07:20 UTC (rev 1427)
@@ -1,6 +1,12 @@
2004-04-09 Todd Berman <tberman at sevenl.net>
* Gui/SourceEditorBuffer.cs:
+ * CodeCompletionCompletionWindow.cs:
+ add atomic undo on code completion, cause its scary now.
+
+2004-04-09 Todd Berman <tberman at sevenl.net>
+
+ * Gui/SourceEditorBuffer.cs:
* Gui/SourceEditorView.cs:
* CodeCompletion/ICompletionData.cs:
* CodeCompletion/CodeCompletionData.cs:
Modified: trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CompletionWindow.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CompletionWindow.cs 2004-04-09 22:00:39 UTC (rev 1426)
+++ trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CompletionWindow.cs 2004-04-09 23:07:20 UTC (rev 1427)
@@ -229,6 +229,7 @@
/// </remarks>
public void ShowCompletionWindow (char firstChar, TextIter trigIter, bool magic)
{
+ control.buf.StartAtomicUndo ();
triggeringMark = control.Buffer.CreateMark (null, trigIter, true);
origOffset = trigIter.Offset;
FillList (true, firstChar);
@@ -316,6 +317,7 @@
declarationviewwindow.HideAll ();
this.Hide ();
control.buf.DropCompleteAhead ();
+ control.buf.EndAtomicUndo ();
}
void FillList (bool firstTime, char ch)
Modified: trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorBuffer.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorBuffer.cs 2004-04-09 22:00:39 UTC (rev 1426)
+++ trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorBuffer.cs 2004-04-09 23:07:20 UTC (rev 1427)
@@ -64,6 +64,7 @@
TextTag markup;
TextTag complete_ahead;
TextMark complete_end;
+ AtomicUndo atomic_undo;
public SourceEditorBuffer () : base (new SourceTagTable ())
{
@@ -110,6 +111,16 @@
it.BackwardChars (what.Length);
PlaceCursor (it);
}
+
+ public void StartAtomicUndo ()
+ {
+ atomic_undo = new AtomicUndo (this);
+ }
+
+ public void EndAtomicUndo ()
+ {
+ atomic_undo.Dispose ();
+ }
public void LoadFile (string file, string mime)
{
More information about the Monodevelop-patches-list
mailing list