diff options
author | Neil <nyamatongwe@gmail.com> | 2014-07-24 12:54:03 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2014-07-24 12:54:03 +1000 |
commit | 2a833a9ea04ecb588591a63276a9039940855575 (patch) | |
tree | 36f35590d6d79b03577f01f62efbe380ba36f9fc /src | |
parent | 8d53838c4e5fafd24154b33e2d24126e55853ab9 (diff) | |
download | scintilla-mirror-2a833a9ea04ecb588591a63276a9039940855575.tar.gz |
Using separate variable imeCaretBlockOverride for IME mode instead of changing
caretStyle as there could be confusion if the container changes caret style.
Diffstat (limited to 'src')
-rw-r--r-- | src/EditView.cxx | 3 | ||||
-rw-r--r-- | src/EditView.h | 2 | ||||
-rw-r--r-- | src/Editor.cxx | 2 |
3 files changed, 5 insertions, 2 deletions
diff --git a/src/EditView.cxx b/src/EditView.cxx index 58d8a1415..b033c7cf6 100644 --- a/src/EditView.cxx +++ b/src/EditView.cxx @@ -177,6 +177,7 @@ EditView::EditView() { lineWidthMaxSeen = 0; additionalCaretsBlink = true; additionalCaretsVisible = true; + imeCaretBlockOverride = false; pixmapLine = 0; pixmapIndentGuide = 0; pixmapIndentGuideHighlight = 0; @@ -1117,7 +1118,7 @@ void EditView::DrawCarets(Surface *surface, const EditModel &model, const ViewSt rcCaret.top = rcCaret.bottom - 2; rcCaret.left = xposCaret + 1; rcCaret.right = rcCaret.left + widthOverstrikeCaret - 1; - } else if (vsDraw.caretStyle == CARETSTYLE_BLOCK) { + } else if ((vsDraw.caretStyle == CARETSTYLE_BLOCK) || imeCaretBlockOverride) { /* Block caret */ rcCaret.left = xposCaret; if (!caretAtEOL && !caretAtEOF && (ll->chars[offset] != '\t') && !(IsControlCharacter(ll->chars[offset]))) { diff --git a/src/EditView.h b/src/EditView.h index ea59ac03a..7d64aff90 100644 --- a/src/EditView.h +++ b/src/EditView.h @@ -68,6 +68,8 @@ public: bool additionalCaretsBlink; bool additionalCaretsVisible; + bool imeCaretBlockOverride; + Surface *pixmapLine; Surface *pixmapIndentGuide; Surface *pixmapIndentGuideHighlight; diff --git a/src/Editor.cxx b/src/Editor.cxx index 2e966a4e5..e0fc18162 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -1246,7 +1246,7 @@ Editor::XYScrollPosition Editor::XYScrollToMakeVisible(const SelectionRange &ran newXY.xOffset = static_cast<int>(pt.x + xOffset - rcClient.left) - 2; } else if (pt.x + xOffset >= rcClient.right + newXY.xOffset) { newXY.xOffset = static_cast<int>(pt.x + xOffset - rcClient.right) + 2; - if (vs.caretStyle == CARETSTYLE_BLOCK) { + if ((vs.caretStyle == CARETSTYLE_BLOCK) || view.imeCaretBlockOverride) { // Ensure we can see a good portion of the block caret newXY.xOffset += static_cast<int>(vs.aveCharWidth); } |