From 1469ac92b931c4e43046964116fcc4a0ae73100c Mon Sep 17 00:00:00 2001 From: Zufu Liu Date: Tue, 5 Feb 2019 09:02:14 +1100 Subject: Feature [feature-requests:#1217]. Change API so block just for overstrike. --- src/Editor.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Editor.cxx') diff --git a/src/Editor.cxx b/src/Editor.cxx index 800037501..483d51799 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -1354,7 +1354,7 @@ Editor::XYScrollPosition Editor::XYScrollToMakeVisible(const SelectionRange &ran newXY.xOffset = static_cast(pt.x + xOffset - rcClient.left) - 2; } else if (pt.x + xOffset >= rcClient.right + newXY.xOffset) { newXY.xOffset = static_cast(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(vs.aveCharWidth); } @@ -7290,7 +7290,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(wParam); else /* Default to the line caret */ -- cgit v1.2.3