aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/parser.cpp
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2015-07-14 03:29:29 +0200
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2015-07-14 03:29:29 +0200
commit45e2f9a5c6a8ac29ce9fa1bf2e18343098c4a050 (patch)
treef153a392222863bfdec8f1b8b79da28710aa5790 /src/parser.cpp
parentc39b54543c81fefdf30a67caac9a86f9f8ecd215 (diff)
downloadsciteco-45e2f9a5c6a8ac29ce9fa1bf2e18343098c4a050.tar.gz
curses UI: support terminal palette restoration on PDCurses/win32 and xterm
* palette changes are persistent on PDCurses/win32, too. Fortunately, on this port we can reliably query the console palette. This is done ONLY on PDcurses/win32 since on other ports (notably ncurses), this can cause more harm than it helps. * support palette restoration on xterm by hardcoding the appropriate escape sequence. $TERM cannot be used to identify xterm, but looking at $XTERM_VERSION is sufficient hopefully.
Diffstat (limited to 'src/parser.cpp')
-rw-r--r--src/parser.cpp19
1 files changed, 8 insertions, 11 deletions
diff --git a/src/parser.cpp b/src/parser.cpp
index 1da6905..1942281 100644
--- a/src/parser.cpp
+++ b/src/parser.cpp
@@ -2060,19 +2060,16 @@ StateECommand::custom(gchar chr)
* Note that on 8 color terminals, only the first 8 colors
* can be redefined (if you are lucky).
* Note that due to restrictions of most terminal emulators
- * and some curses implementations, this command will not
- * and cannot restore the original palette entry or request
+ * and some curses implementations, this command simply will not
+ * restore the original palette entry or request
* when rubbed out and should generally only be used in
* \fIbatch-mode\fP \(em typically when loading a color scheme.
- * For the same reasons, palette changes may persist
- * after \*(ST terminates on most terminal emulators.
- * The only emulator which restores the palette on exit the
- * author is aware of is the Linux console driver.
- * Few other emulators like \fBxterm\fP(1) might support
- * palette resets but this cannot be done automatically
- * by \*(ST for technical and historical reasons.
- * Users might try to work around this by tweaking their
- * \fBterminfo\fP(5) database.
+ * For the same reasons \(em even though \*(ST tries hard to
+ * restore the original palette on exit \(em palette changes may
+ * persist after \*(ST terminates on most terminal emulators on Unix.
+ * The only emulator which will restore their default palette
+ * on exit the author is aware of is \fBxterm\fP(1) and
+ * the Linux console driver.
* You have been warned. Good luck.
*/
case 'J': {