diff options
author | Neil <nyamatongwe@gmail.com> | 2019-06-22 10:51:29 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2019-06-22 10:51:29 +1000 |
commit | 4c8a1f741c73911eff813a78c08fa88427eec38b (patch) | |
tree | a5b276ee266c723adc22e1afe8fa47f7cb0bb80c /src/ViewStyle.cxx | |
parent | 8b8e1f383f0dbabc5e2f4666f4c5aa8860a91848 (diff) | |
download | scintilla-mirror-4c8a1f741c73911eff813a78c08fa88427eec38b.tar.gz |
Backport: Bug [#1924]. Option to allow block carets to trail selection ranges.
Bit flag value is CARETSTYLE_BLOCK_AFTER=256.
Backport of changeset 7609:340a0f51fb3c.
Diffstat (limited to 'src/ViewStyle.cxx')
-rw-r--r-- | src/ViewStyle.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ViewStyle.cxx b/src/ViewStyle.cxx index c867c2f76..ec6d8e52c 100644 --- a/src/ViewStyle.cxx +++ b/src/ViewStyle.cxx @@ -545,10 +545,13 @@ bool ViewStyle::SetWrapIndentMode(int wrapIndentMode_) noexcept { } bool ViewStyle::IsBlockCaretStyle() const noexcept { - return (caretStyle == CARETSTYLE_BLOCK) || (caretStyle & CARETSTYLE_OVERSTRIKE_BLOCK) != 0; + return ((caretStyle & CARETSTYLE_INS_MASK) == CARETSTYLE_BLOCK) || + (caretStyle & CARETSTYLE_OVERSTRIKE_BLOCK) != 0; } bool ViewStyle::DrawCaretInsideSelection(bool inOverstrike, bool imeCaretBlockOverride) const noexcept { + if (caretStyle & CARETSTYLE_BLOCK_AFTER) + return false; return ((caretStyle & CARETSTYLE_INS_MASK) == CARETSTYLE_BLOCK) || (inOverstrike && (caretStyle & CARETSTYLE_OVERSTRIKE_BLOCK) != 0) || imeCaretBlockOverride; |