diff options
author | Neil <nyamatongwe@gmail.com> | 2014-12-17 19:45:10 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2014-12-17 19:45:10 +1100 |
commit | 45c5276ca7081d0e99d8520b89e077d3015bdaee (patch) | |
tree | f86e731071d30b24b12836afcced6e2a3e78f070 | |
parent | 02029d29fe065e7796a0add621554d555429e1fc (diff) | |
download | scintilla-mirror-45c5276ca7081d0e99d8520b89e077d3015bdaee.tar.gz |
More natural looping over visual attributes.
-rw-r--r-- | gtk/ScintillaGTK.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
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; |