aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorZufu Liu <unknown>2020-07-11 12:33:24 +1000
committerZufu Liu <unknown>2020-07-11 12:33:24 +1000
commita98083295aa452d8624b43ea728f6ab0e4cc79d6 (patch)
treef2c9afa15cb62795594cd18f3990d56d4cb66228
parent0d82cdcb2cb889efe2a6370309593cda64528cc2 (diff)
downloadscintilla-mirror-a98083295aa452d8624b43ea728f6ab0e4cc79d6.tar.gz
Backport: Treat DEL as a control character for determining block caret size.
Moved IsControlCharacter to anonymous namespace. Backport of changeset 8396:16e8656c36a7.
-rw-r--r--src/EditView.cxx11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/EditView.cxx b/src/EditView.cxx
index 35fee11f5..49e77d8db 100644
--- a/src/EditView.cxx
+++ b/src/EditView.cxx
@@ -58,11 +58,6 @@
using namespace Scintilla;
-static constexpr bool IsControlCharacter(int ch) noexcept {
- // iscntrl returns true for lots of chars > 127 which are displayable
- return ch >= 0 && ch < ' ';
-}
-
PrintParameters::PrintParameters() noexcept {
magnification = 0;
colourMode = SC_PRINT_NORMAL;
@@ -369,6 +364,12 @@ inline char CaseForce(Style::ecaseForced caseForce, char chDoc, char chPrevious)
}
}
+constexpr bool IsControlCharacter(int ch) noexcept {
+ // iscntrl returns true for lots of chars > 127 which are displayable,
+ // currently only check C0 control characters.
+ return (ch >= 0 && ch < ' ') || (ch == 127);
+}
+
}
/**