diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2013-01-20 02:24:52 +0100 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2013-01-20 02:24:52 +0100 |
commit | 1e55387482bd501770aafc4230cbcad870d3abf3 (patch) | |
tree | e5d7d566056363c7b8ac968f19a083eaf2d5aec0 /patches | |
parent | eb35babede8a65bdf31b5d864fe36164792364bd (diff) | |
download | sciteco-1e55387482bd501770aafc4230cbcad870d3abf3.tar.gz |
added patch enabling TECO-style (^X) control code echoing in Scintilla
in the future, I might submit a more elaborate Scintilla patch for configuring
the control code strings.
Diffstat (limited to 'patches')
-rw-r--r-- | patches/scintilla-teco-control-codes.patch | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/patches/scintilla-teco-control-codes.patch b/patches/scintilla-teco-control-codes.patch new file mode 100644 index 0000000..d95a008 --- /dev/null +++ b/patches/scintilla-teco-control-codes.patch @@ -0,0 +1,29 @@ +--- scintilla/src/Editor.cxx 2013-01-19 21:51:58.002270685 +0100 ++++ scintilla/src/Editor.cxx 2013-01-20 02:07:27.212272030 +0100 +@@ -351,10 +351,10 @@ + + const char *ControlCharacterString(unsigned char ch) { + const char *reps[] = { +- "NUL", "SOH", "STX", "ETX", "EOT", "ENQ", "ACK", "BEL", +- "BS", "HT", "LF", "VT", "FF", "CR", "SO", "SI", +- "DLE", "DC1", "DC2", "DC3", "DC4", "NAK", "SYN", "ETB", +- "CAN", "EM", "SUB", "ESC", "FS", "GS", "RS", "US" ++ "^@", "^A", "^B", "^C", "^D", "^E", "^F", "^G", ++ "^H", "TAB" /* ^I */, "LF" /* ^J */, "^K", "^L", "CR" /* ^M */, "^N", "^O", ++ "^P", "^Q", "^R", "^S", "^T", "^U", "^V", "^W", ++ "^X", "^Y", "^Z", "$" /* ^[ */, "^\\", "^]", "^^", "^_" + }; + if (ch < (sizeof(reps) / sizeof(reps[0]))) { + return reps[ch]; +--- scintilla/scinterm/ScintillaTerm.cxx 2013-01-19 23:49:46.092268831 +0100 ++++ scintilla/scinterm/ScintillaTerm.cxx 2013-01-20 01:55:36.213521263 +0100 +@@ -290,8 +290,7 @@ + void DrawTextClipped(PRectangle rc, Font &font_, XYPOSITION ybase, + const char *s, int len, ColourDesired fore, + ColourDesired back) { +- if ((len == 2 && (isupper(s[0]) && isupper(s[1]))) || +- (len == 3 && (isupper(s[0]) && isupper(s[1]) && isupper(s[2])))) ++ if (rc.left >= rc.right) + rc.left -= 2, rc.right -= 2, rc.top -= 1, rc.bottom -= 1; + else if (rc.top > rc.bottom) + rc.top -= 1, rc.bottom += 1; |