diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Editor.cxx | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx index 9bf949a37..07c3c4087 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -7251,12 +7251,7 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { return vs.caretStyle; case SCI_SETCARETWIDTH: - if (static_cast<int>(wParam) <= 0) - vs.caretWidth = 0; - else if (wParam >= 3) - vs.caretWidth = 3; - else - vs.caretWidth = static_cast<int>(wParam); + vs.caretWidth = Sci::clamp(static_cast<int>(wParam), 0, 3); InvalidateStyleRedraw(); break; |