Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/mcs/class
diff options
context:
space:
mode:
authorKarl <karl@scowencomputers.co.nz>2018-07-06 03:46:42 +0300
committerKarl <contact@scowencomputers.co.nz>2020-01-13 07:54:00 +0300
commit24c2e505a3fc5eeaa7e1f2ac2a221cfaded5fe0b (patch)
tree7fba48188f309811c88ac6241e441736a34c2a0d /mcs/class
parente586084ae895f1b6a9f713f75d9c248b9787476d (diff)
Fix updating to cover lines modified while suspended.
Diffstat (limited to 'mcs/class')
-rw-r--r--mcs/class/System.Windows.Forms/System.Windows.Forms/TextControl.cs7
1 files changed, 6 insertions, 1 deletions
diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms/TextControl.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms/TextControl.cs
index 69c3c212be3..58ee0a5df0e 100644
--- a/mcs/class/System.Windows.Forms/System.Windows.Forms/TextControl.cs
+++ b/mcs/class/System.Windows.Forms/System.Windows.Forms/TextControl.cs
@@ -3395,6 +3395,11 @@ namespace System.Windows.Forms {
ResumeRecalc (false);
PositionCaret (selection_start.line, selection_start.pos);
+
+ if (begin_update_line.line_no > selection_start.line.line_no) {
+ begin_update_line = selection_start.line;
+ begin_update_pos = selection_start.pos;
+ }
UpdateView (begin_update_line, selection_end.line.line_no - begin_update_line.line_no, begin_update_pos);
}
@@ -3908,7 +3913,7 @@ namespace System.Windows.Forms {
}
private void owner_VisibleChanged(object sender, EventArgs e) {
- if (owner.Visible) {
+ if (owner.Visible && owner.IsHandleCreated) {
using (var graphics = owner.CreateGraphics())
RecalculateDocument(graphics);
}