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

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main/src/core/Mono.Texteditor/Mono.TextEditor/Gui/TextViewMargin.cs8
1 files changed, 5 insertions, 3 deletions
diff --git a/main/src/core/Mono.Texteditor/Mono.TextEditor/Gui/TextViewMargin.cs b/main/src/core/Mono.Texteditor/Mono.TextEditor/Gui/TextViewMargin.cs
index 8bfceea160..ee83ac7b7d 100644
--- a/main/src/core/Mono.Texteditor/Mono.TextEditor/Gui/TextViewMargin.cs
+++ b/main/src/core/Mono.Texteditor/Mono.TextEditor/Gui/TextViewMargin.cs
@@ -3031,12 +3031,14 @@ namespace Mono.TextEditor
return 0;
var wrapper = GetLayout (line);
- Pango.Rectangle inkrect, logicalrect;
- wrapper.Layout.GetExtents (out inkrect, out logicalrect);
+ uint curIndex = 0;
+ uint byteIndex = 0;
+
+ var pos = wrapper.Layout.IndexToPos ((int)TranslateToUTF8Index (wrapper.LineChars, (uint)column, ref curIndex, ref byteIndex));
if (wrapper.IsUncached)
wrapper.Dispose ();
- return (logicalrect.Width + Pango.Scale.PangoScale - 1) / Pango.Scale.PangoScale;
+ return (pos.X + Pango.Scale.PangoScale - 1) / Pango.Scale.PangoScale;
}
public int YToLine (double yPos)