[mono/monodevelop] c3b5311a: [TextEditor] Guard against potential vi status area infinite loop.
| Newsgroups | gmane.comp.gnome.mono.patches |
|---|---|
| Message-ID | <0000014251452f8d-7206da8f-93fc-4ed0-8e59-0883680f4faf-000000@email.amazonses.com> |
Branch: refs/heads/master
Home: https://github.com/mono/monodevelop
Compare: https://github.com/mono/monodevelop/compare/df408a1a0b92...c3b5311aa48f
Commit: c3b5311aa48f0ac40c914521af666ab48acaa478
Author: Mike Krüger <[email protected]> (mkrueger)
Date: 2013-11-13 12:41:00 GMT
URL: https://github.com/mono/monodevelop/commit/c3b5311aa48f0ac40c914521af666ab48acaa478
[TextEditor] Guard against potential vi status area infinite loop.
Changed paths:
M main/src/core/Mono.Texteditor/Mono.TextEditor.Vi/ViStatusArea.cs
Modified: main/src/core/Mono.Texteditor/Mono.TextEditor.Vi/ViStatusArea.cs
===================================================================
@@ -69,11 +69,16 @@ protected override void OnDestroyed ()
base.OnDestroyed ();
}
+ Gdk.Rectangle lastAllocation;
public void AllocateArea (TextArea textArea, Gdk.Rectangle allocation)
{
if (!Visible)
Show ();
allocation.Height -= (int)textArea.LineHeight;
+ if (lastAllocation == allocation)
+ return;
+ lastAllocation = allocation;
+
if (textArea.Allocation != allocation)
textArea.SizeAllocate (allocation);
SetSizeRequest (allocation.Width, (int)editor.LineHeight);
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches