Author: mkrueger
Date: 2008-02-03 08:05:59 -0500 (Sun, 03 Feb 2008)
New Revision: 94680
Modified:
trunk/monodevelop/main/src/addins/Mono.Texteditor/ChangeLog
trunk/monodevelop/main/src/addins/Mono.Texteditor/Mono.TextEditor/BookmarkMargin.cs
trunk/monodevelop/main/src/addins/Mono.Texteditor/Mono.TextEditor/TextEditor.cs
Log:
* Mono.TextEditor/TextEditor.cs, Mono.TextEditor/BookmarkMargin.cs:
Some changes for the splitting feature.
Modified: trunk/monodevelop/main/src/addins/Mono.Texteditor/ChangeLog
===================================================================
--- trunk/monodevelop/main/src/addins/Mono.Texteditor/ChangeLog 2008-02-03
12:56:17 UTC (rev 94679)
+++ trunk/monodevelop/main/src/addins/Mono.Texteditor/ChangeLog 2008-02-03
13:05:59 UTC (rev 94680)
@@ -1,5 +1,10 @@
2008-02-03 Mike Krüger <[EMAIL PROTECTED]>
+ * Mono.TextEditor/TextEditor.cs, Mono.TextEditor/BookmarkMargin.cs: Some
+ changes for the splitting feature.
+
+2008-02-03 Mike Krüger <[EMAIL PROTECTED]>
+
* Mono.TextEditor/LineSplitter.cs, Mono.TextEditor/TextEditor.cs,
Mono.TextEditor/GutterMargin.cs: Gutter redraws on width changes.
Modified:
trunk/monodevelop/main/src/addins/Mono.Texteditor/Mono.TextEditor/BookmarkMargin.cs
===================================================================
---
trunk/monodevelop/main/src/addins/Mono.Texteditor/Mono.TextEditor/BookmarkMargin.cs
2008-02-03 12:56:17 UTC (rev 94679)
+++
trunk/monodevelop/main/src/addins/Mono.Texteditor/Mono.TextEditor/BookmarkMargin.cs
2008-02-03 13:05:59 UTC (rev 94680)
@@ -60,7 +60,8 @@
if (lineNumber < editor.Splitter.LineCount) {
LineSegment lineSegment =
editor.Document.GetLine (lineNumber);
lineSegment.IsBookmarked =
!lineSegment.IsBookmarked;
- editor.RedrawLine (lineNumber);
+ editor.Document.RequestUpdate (new LineUpdate
(lineNumber));
+ editor.Document.CommitDocumentUpdate ();
}
}
Modified:
trunk/monodevelop/main/src/addins/Mono.Texteditor/Mono.TextEditor/TextEditor.cs
===================================================================
---
trunk/monodevelop/main/src/addins/Mono.Texteditor/Mono.TextEditor/TextEditor.cs
2008-02-03 12:56:17 UTC (rev 94679)
+++
trunk/monodevelop/main/src/addins/Mono.Texteditor/Mono.TextEditor/TextEditor.cs
2008-02-03 13:05:59 UTC (rev 94680)
@@ -330,26 +330,27 @@
}
- public void RedrawLine (int logicalLine)
+ internal void RedrawLine (int logicalLine)
{
// Console.WriteLine ("redraw:" + logicalLine);
this.QueueDrawArea (0,
(int)-this.textEditorData.VAdjustment.Value + Document.LogicalToVisualLine
(logicalLine) * LineHeight, this.Allocation.Width, LineHeight);
}
- public void RedrawPosition (int logicalLine, int logicalColumn)
+ internal void RedrawPosition (int logicalLine, int
logicalColumn)
{
// Console.WriteLine ("redraw:" + logicalLine);
RedrawLine (logicalLine);
// this.QueueDrawArea (0,
(int)-this.textEditorData.VAdjustment.Value + Document.LogicalToVisualLine
(logicalLine) * LineHeight, this.Allocation.Width, LineHeight);
}
- public void RedrawLines (int start, int end)
+ internal void RedrawLines (int start, int end)
{
int visualStart =
(int)-this.textEditorData.VAdjustment.Value + Document.LogicalToVisualLine
(start) * LineHeight;
int visualEnd =
(int)-this.textEditorData.VAdjustment.Value + Document.LogicalToVisualLine
(end) * LineHeight + LineHeight;
this.QueueDrawArea (0, visualStart,
this.Allocation.Width, visualEnd - visualStart );
}
- public void RedrawFromLine (int logicalLine)
+
+ internal void RedrawFromLine (int logicalLine)
{
this.QueueDrawArea (0,
(int)-this.textEditorData.VAdjustment.Value + Document.LogicalToVisualLine
(logicalLine) * LineHeight, this.Allocation.Width, this.Allocation.Height);
}
@@ -389,7 +390,13 @@
char ch = (char)key;
if (!char.IsControl (ch)) {
Buffer.Insert (Caret.Offset, new
StringBuilder (ch.ToString()));
+ bool autoScroll =
Caret.AutoScrollToCaret;
Caret.Column++;
+ Caret.AutoScrollToCaret = autoScroll;
+ if (autoScroll)
+ ScrollToCaret ();
+ Document.RequestUpdate (new LineUpdate
(Caret.Line));
+ Document.CommitDocumentUpdate ();
}
}
ResetCaretBlink ();
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches