From 1f23423442a85280b935f7a65160355b8695342b Mon Sep 17 00:00:00 2001 From: Neil Date: Wed, 17 Jun 2020 11:06:15 +1000 Subject: Backport: Feature [feature-requests:1361]. Allow caret width to be up to 20 pixels. Backport of changeset 8308:9f3c5a4c4b52. --- 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 4f89ef69e..3848140d6 100644 --- a/doc/ScintillaDoc.html +++ b/doc/ScintillaDoc.html @@ -3292,9 +3292,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 f60a1fb4a..def900bc2 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -591,6 +591,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 195be8a01..4bcebaf8d 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -7375,7 +7375,7 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { return vs.caretStyle; case SCI_SETCARETWIDTH: - vs.caretWidth = Sci::clamp(static_cast(wParam), 0, 3); + vs.caretWidth = Sci::clamp(static_cast(wParam), 0, 20); InvalidateStyleRedraw(); break; -- cgit v1.2.3