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 | 8b8e1f383f0dbabc5e2f4666f4c5aa8860a91848 (patch) | |
tree | f398bde19d8e842fd4a4185f89775de5f876ec33 /src/ViewStyle.cxx | |
parent | 1db15a4f04a7c337b8061efe3ef033b21bba0cec (diff) | |
download | scintilla-mirror-8b8e1f383f0dbabc5e2f4666f4c5aa8860a91848.tar.gz |
Backport: Bug [#2106]. Place line caret in correct location for line caret with block OVR.
That is for CARETSTYLE_LINE | CARETSTYLE_BLOCK mode.
Backport of changeset 7608:b725657be4ae.
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 ddebf862b..c867c2f76 100644 --- a/src/ViewStyle.cxx +++ b/src/ViewStyle.cxx @@ -548,6 +548,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; |