From 3cb12627268d09f6ea9608cd9d99994c36bf149c Mon Sep 17 00:00:00 2001 From: Neil Date: Wed, 17 Dec 2014 19:45:10 +1100 Subject: More natural looping over visual attributes. --- gtk/ScintillaGTK.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gtk') diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx index 7ab638ada..61eba53c1 100644 --- a/gtk/ScintillaGTK.cxx +++ b/gtk/ScintillaGTK.cxx @@ -2387,7 +2387,7 @@ void ScintillaGTK::GetImeUnderlines(PangoAttrList *attrs, bool *normalInput) { glong start = attrunderline->start_index; glong end = attrunderline->end_index; PangoUnderline uline = (PangoUnderline)((PangoAttrInt *)attrunderline)->value; - for (glong i=start+1; i <= end; ++i) { + for (glong i=start; i < end; ++i) { switch (uline) { case PANGO_UNDERLINE_NONE: normalInput[i] = false; @@ -2417,7 +2417,7 @@ void ScintillaGTK::GetImeBackgrounds(PangoAttrList *attrs, bool *targetInput) { if (backcolor) { glong start = backcolor->start_index; glong end = backcolor->end_index; - for (glong i=start+1; i <= end; ++i) { + for (glong i=start; i < end; ++i) { targetInput[i] = true; // target converted } } @@ -2516,7 +2516,7 @@ void ScintillaGTK::PreeditChangedInlineThis() { // Display preedit characters, one by one glong imeCharPos[maxLenInputIME+1] = { 0 }; - glong attrPos = 0; + glong attrPos = -1; // Start at -1 to designate the last byte of one character. glong charWidth = 0; bool tmpRecordingMacro = recordingMacro; -- cgit v1.2.3