diff options
author | Neil <nyamatongwe@gmail.com> | 2019-06-21 07:16:45 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2019-06-21 07:16:45 +1000 |
commit | 8aa1cae911d5323f2e435c37ef5132c90f16ed55 (patch) | |
tree | f805889c17afb975c775e0e0dba350c46c8a6d4a /src/ViewStyle.cxx | |
parent | 53759e5436863c0bb4e6c015e67e93c711250644 (diff) | |
download | scintilla-mirror-8aa1cae911d5323f2e435c37ef5132c90f16ed55.tar.gz |
Bug [#2106]. Place line caret in correct location for line caret with block OVR.
That is for CARETSTYLE_LINE | CARETSTYLE_BLOCK mode.
Diffstat (limited to 'src/ViewStyle.cxx')
-rw-r--r-- | src/ViewStyle.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ViewStyle.cxx b/src/ViewStyle.cxx index 6b24e15fb..65c4f2f8e 100644 --- a/src/ViewStyle.cxx +++ b/src/ViewStyle.cxx @@ -549,6 +549,12 @@ bool ViewStyle::IsBlockCaretStyle() const noexcept { return (caretStyle == CARETSTYLE_BLOCK) || (caretStyle & CARETSTYLE_OVERSTRIKE_BLOCK) != 0; } +bool ViewStyle::DrawCaretInsideSelection(bool inOverstrike, bool imeCaretBlockOverride) const noexcept { + return ((caretStyle & CARETSTYLE_INS_MASK) == CARETSTYLE_BLOCK) || + (inOverstrike && (caretStyle & CARETSTYLE_OVERSTRIKE_BLOCK) != 0) || + imeCaretBlockOverride; +} + ViewStyle::CaretShape ViewStyle::CaretShapeForMode(bool inOverstrike) const noexcept { if (inOverstrike) { return (caretStyle & CARETSTYLE_OVERSTRIKE_BLOCK) ? CaretShape::block : CaretShape::bar; |