diff options
author | Zufu Liu <unknown> | 2020-03-19 08:53:15 +1100 |
---|---|---|
committer | Zufu Liu <unknown> | 2020-03-19 08:53:15 +1100 |
commit | 1b955a332fdea892683764467ca64f0704e98dab (patch) | |
tree | b6c83f7457b5505ec8555d925cf9669f7dd78b39 /src/ViewStyle.cxx | |
parent | ba62a1336c28132755aaac894e602f9dcff8f960 (diff) | |
download | scintilla-mirror-1b955a332fdea892683764467ca64f0704e98dab.tar.gz |
Feature [feature-requests:1302] Add IsCaretVisible to simplify DrawCarets.
Diffstat (limited to 'src/ViewStyle.cxx')
-rw-r--r-- | src/ViewStyle.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ViewStyle.cxx b/src/ViewStyle.cxx index e75184488..30a77f872 100644 --- a/src/ViewStyle.cxx +++ b/src/ViewStyle.cxx @@ -550,6 +550,10 @@ bool ViewStyle::IsBlockCaretStyle() const noexcept { (caretStyle & CARETSTYLE_OVERSTRIKE_BLOCK) != 0; } +bool ViewStyle::IsCaretVisible() const noexcept { + return caretWidth > 0 && caretStyle != CARETSTYLE_INVISIBLE; +} + bool ViewStyle::DrawCaretInsideSelection(bool inOverstrike, bool imeCaretBlockOverride) const noexcept { if (caretStyle & CARETSTYLE_BLOCK_AFTER) return false; |