From 1573a0d60a3cf054979125c7986566d13a6686d3 Mon Sep 17 00:00:00 2001 From: Neil Date: Sat, 22 Jun 2019 10:51:29 +1000 Subject: Bug [#1924]. Option to allow block carets to trail selection ranges. Bit flag value is CARETSTYLE_BLOCK_AFTER=256. --- src/ViewStyle.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/ViewStyle.cxx') diff --git a/src/ViewStyle.cxx b/src/ViewStyle.cxx index 65c4f2f8e..e75184488 100644 --- a/src/ViewStyle.cxx +++ b/src/ViewStyle.cxx @@ -546,10 +546,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; -- cgit v1.2.3