aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Editor.cxx
diff options
context:
space:
mode:
authorZufu Liu <unknown>2019-02-05 09:02:14 +1100
committerZufu Liu <unknown>2019-02-05 09:02:14 +1100
commit08b7ba9c6804232efe62a7cb970013548318417f (patch)
treea4f25d217cf3fd462b862514991b6b0f130f6c86 /src/Editor.cxx
parent9cc096e3f7deb6f10512e30da3e589eed927fdd5 (diff)
downloadscintilla-mirror-08b7ba9c6804232efe62a7cb970013548318417f.tar.gz
Backport: Feature [feature-requests:#1217]. Change API so block just for overstrike.
Backport of changeset 7249:06b6a93d8e3f.
Diffstat (limited to 'src/Editor.cxx')
-rw-r--r--src/Editor.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx
index f48ba333b..e6a1637f9 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -1351,7 +1351,7 @@ Editor::XYScrollPosition Editor::XYScrollToMakeVisible(const SelectionRange &ran
newXY.xOffset = static_cast<int>(pt.x + xOffset - rcClient.left) - 2;
} else if (pt.x + xOffset >= rcClient.right + newXY.xOffset) {
newXY.xOffset = static_cast<int>(pt.x + xOffset - rcClient.right) + 2;
- if ((vs.caretStyle == CARETSTYLE_BLOCK || vs.caretStyle == CARETSTYLE_BLOCK_ALWAYS) || view.imeCaretBlockOverride) {
+ if (vs.IsBlockCaretStyle() || view.imeCaretBlockOverride) {
// Ensure we can see a good portion of the block caret
newXY.xOffset += static_cast<int>(vs.aveCharWidth);
}
@@ -7277,7 +7277,7 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {
return vs.caretcolour.AsInteger();
case SCI_SETCARETSTYLE:
- if (wParam <= CARETSTYLE_BLOCK_ALWAYS)
+ if (wParam <= (CARETSTYLE_BLOCK | CARETSTYLE_OVERSTRIKE_BLOCK))
vs.caretStyle = static_cast<int>(wParam);
else
/* Default to the line caret */