diff options
author | Zufu Liu <unknown> | 2020-07-11 12:33:24 +1000 |
---|---|---|
committer | Zufu Liu <unknown> | 2020-07-11 12:33:24 +1000 |
commit | eefbc33a98c77976b8d8376fffee0f349360de19 (patch) | |
tree | 146867afc6cc74c7d9cc2b7845add5aedd63aabd /src/EditView.cxx | |
parent | d59a10eddefab7523aa8846dfd21b17ee6c0cdd8 (diff) | |
download | scintilla-mirror-eefbc33a98c77976b8d8376fffee0f349360de19.tar.gz |
Treat DEL as a control character for determining block caret size.
Moved IsControlCharacter to anonymous namespace.
Diffstat (limited to 'src/EditView.cxx')
-rw-r--r-- | src/EditView.cxx | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/EditView.cxx b/src/EditView.cxx index 290106a49..82e64ce16 100644 --- a/src/EditView.cxx +++ b/src/EditView.cxx @@ -59,11 +59,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); +} + } /** |