aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2020-06-17 11:06:15 +1000
committerNeil <nyamatongwe@gmail.com>2020-06-17 11:06:15 +1000
commit1f23423442a85280b935f7a65160355b8695342b (patch)
tree999e037ea06079ac92903aeaa1ca3fe4435f27b4
parent16a54de702c1c6c0f9d6a74f019964b5be1cc64d (diff)
downloadscintilla-mirror-1f23423442a85280b935f7a65160355b8695342b.tar.gz
Backport: Feature [feature-requests:1361]. Allow caret width to be up to 20 pixels.
Backport of changeset 8308:9f3c5a4c4b52.
-rw-r--r--doc/ScintillaDoc.html6
-rw-r--r--doc/ScintillaHistory.html4
-rw-r--r--src/Editor.cxx2
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 {
<p><b id="SCI_SETCARETWIDTH">SCI_SETCARETWIDTH(int pixelWidth)</b><br />
<b id="SCI_GETCARETWIDTH">SCI_GETCARETWIDTH &rarr; int</b><br />
The width of the line caret can be set with <code>SCI_SETCARETWIDTH</code> to a value of
- 0, 1, 2 or 3 pixels. The default width is 1 pixel. You can read back the current width with
- <code>SCI_GETCARETWIDTH</code>. 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
+ <code>SCI_GETCARETWIDTH</code>. 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.</p>
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 @@
<a href="https://sourceforge.net/p/scintilla/feature-requests/1355/">Feature #1355</a>.
</li>
<li>
+ Allow caret width to be up to 20 pixels.
+ <a href="https://sourceforge.net/p/scintilla/feature-requests/1361/">Feature #1361</a>.
+ </li>
+ <li>
Fix printing on Windows to use correct text size.
<a href="https://sourceforge.net/p/scintilla/bugs/2185/">Bug #2185</a>.
</li>
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<int>(wParam), 0, 3);
+ vs.caretWidth = Sci::clamp(static_cast<int>(wParam), 0, 20);
InvalidateStyleRedraw();
break;