[mono/monodevelop] c30a0615: Fixed 'Bug 15189 - Incorrect underlining after accented characters '.
| Newsgroups | gmane.comp.gnome.mono.patches |
|---|---|
| Message-ID | <000001418285533a-6e56b449-501f-47f0-b723-7678206a1bdc-000000@email.amazonses.com> |
Branch: refs/heads/master
Home: https://github.com/mono/monodevelop
Compare: https://github.com/mono/monodevelop/compare/2f87e94e9c52...c30a06152b09
Commit: c30a06152b09ae23fc13dfa96012325a61be1fb3
Author: Mike Krüger <[email protected]> (mkrueger)
Date: 2013-10-04 08:09:54 GMT
URL: https://github.com/mono/monodevelop/commit/c30a06152b09ae23fc13dfa96012325a61be1fb3
Fixed 'Bug 15189 - Incorrect underlining after accented characters '.
Changed paths:
M main/src/core/Mono.Texteditor/Mono.TextEditor/UrlMarker.cs
Modified: main/src/core/Mono.Texteditor/Mono.TextEditor/UrlMarker.cs
===================================================================
@@ -27,6 +27,7 @@
using System;
using Gdk;
using Mono.TextEditor.Highlighting;
+using Gtk;
namespace Mono.TextEditor
{
@@ -121,11 +122,13 @@ public override void Draw (TextEditor editor, Cairo.Context cr, double y, LineMe
} else {
int start = startOffset < markerStart ? markerStart : startOffset;
int end = endOffset < markerEnd ? endOffset : markerEnd;
- int x_pos = layout.IndexToPos (start - startOffset).X;
-
+
+ uint curIndex = 0, byteIndex = 0;
+ int x_pos = layout.IndexToPos ((int)metrics.Layout.TranslateToUTF8Index ((uint)(start - startOffset), ref curIndex, ref byteIndex)).X;
+
@from = startXPos + (int)(x_pos / Pango.Scale.PangoScale);
- x_pos = layout.IndexToPos (end - startOffset).X;
+ x_pos = layout.IndexToPos ((int)metrics.Layout.TranslateToUTF8Index ((uint)(end - startOffset), ref curIndex, ref byteIndex)).X;
to = startXPos + (int)(x_pos / Pango.Scale.PangoScale);
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches