From 5fc1282d6d4a18f8018bbdd769991eb93171757a Mon Sep 17 00:00:00 2001 From: Neil Date: Wed, 17 Jun 2020 11:06:15 +1000 Subject: Feature [feature-requests:1361]. Allow caret width to be up to 20 pixels. --- doc/ScintillaDoc.html | 6 +++--- doc/ScintillaHistory.html | 4 ++++ src/Editor.cxx | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/doc/ScintillaDoc.html b/doc/ScintillaDoc.html index 786b6f27f..f4dfb1e06 100644 --- a/doc/ScintillaDoc.html +++ b/doc/ScintillaDoc.html @@ -3323,9 +3323,9 @@ struct Sci_TextToFind {

SCI_SETCARETWIDTH(int pixelWidth)
SCI_GETCARETWIDTH → int
The width of the line caret can be set with SCI_SETCARETWIDTH to a value of - 0, 1, 2 or 3 pixels. The default width is 1 pixel. You can read back the current width with - SCI_GETCARETWIDTH. A width of 0 makes the caret invisible (added at version - 1.50), similar to setting the caret style to CARETSTYLE_INVISIBLE (though not interchangeable). + between 0 and 20 pixels. The default width is 1 pixel. You can read back the current width with + SCI_GETCARETWIDTH. A width of 0 makes the caret invisible, + similar to setting the caret style to CARETSTYLE_INVISIBLE (though not interchangeable). This setting only affects the width of the cursor when the cursor style is set to line caret mode, it does not affect the width for a block caret.

diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index 10e88fd2a..e8880ec71 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -588,6 +588,10 @@ Feature #1355.
  • + Allow caret width to be up to 20 pixels. + Feature #1361. +
  • +
  • Fix printing on Windows to use correct text size. Bug #2185.
  • diff --git a/src/Editor.cxx b/src/Editor.cxx index 12688da66..ad41b518d 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -7389,7 +7389,7 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { return vs.caretStyle; case SCI_SETCARETWIDTH: - vs.caretWidth = std::clamp(static_cast(wParam), 0, 3); + vs.caretWidth = std::clamp(static_cast(wParam), 0, 20); InvalidateStyleRedraw(); break; -- cgit v1.2.3