diff options
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); } |