aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2016-11-22 16:30:55 +0100
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2016-11-22 18:15:21 +0100
commit813d9b95d2f59d9a2702e2287f8f6965ba1bbf53 (patch)
tree4489158c677c4c842abdc3d5adf74f19fbd6b390 /src
parent0bf380ff110897d2b5db2e22ef6efe1e9ba9888d (diff)
downloadsciteco-813d9b95d2f59d9a2702e2287f8f6965ba1bbf53.tar.gz
avoid the non-standard \e escape sequence
* shouldn't really be an issue but since we already have CTL_KEY_ESC_STR as a character literal, we may as well use it.
Diffstat (limited to 'src')
-rw-r--r--src/interface-curses/interface-curses.cpp6
-rw-r--r--src/sciteco.h7
2 files changed, 8 insertions, 5 deletions
diff --git a/src/interface-curses/interface-curses.cpp b/src/interface-curses/interface-curses.cpp
index a66cdd0..6a47112 100644
--- a/src/interface-curses/interface-curses.cpp
+++ b/src/interface-curses/interface-curses.cpp
@@ -416,7 +416,7 @@ InterfaceCurses::restore_colors(void)
/*
* Looks like a real XTerm
*/
- fputs("\e]104\a", screen_tty);
+ fputs(CTL_KEY_ESC_STR "]104\a", screen_tty);
fflush(screen_tty);
}
@@ -1183,7 +1183,7 @@ InterfaceCurses::set_clipboard(const gchar *name, const gchar *str, gssize str_l
gint state = 0;
gint save = 0;
- fputs("\e]52;", screen_tty);
+ fputs(CTL_KEY_ESC_STR "]52;", screen_tty);
fputc(get_selection_by_name(name), screen_tty);
fputc(';', screen_tty);
@@ -1233,7 +1233,7 @@ InterfaceCurses::get_clipboard(const gchar *name, gsize *str_len)
* Query the clipboard -- XTerm will reply with the
* OSC-52 command that would set the current selection.
*/
- fputs("\e]52;", screen_tty);
+ fputs(CTL_KEY_ESC_STR "]52;", screen_tty);
fputc(get_selection_by_name(name), screen_tty);
fputs(";?\a", screen_tty);
fflush(screen_tty);
diff --git a/src/sciteco.h b/src/sciteco.h
index b7c62f2..be53b1c 100644
--- a/src/sciteco.h
+++ b/src/sciteco.h
@@ -68,10 +68,13 @@ extern sig_atomic_t sigint_occurred;
#define CTL_KEY(C) ((C) & ~0x40)
/**
* Control character of the escape key.
- * Equivalent to CTL_KEY('[')
+ * Equivalent to CTL_KEY('[') or '\e'.
*/
#define CTL_KEY_ESC 27
-/** String containing the escape character */
+/**
+ * String containing the escape character.
+ * There is "\e", but it's not really standard C/C++.
+ */
#define CTL_KEY_ESC_STR "\x1B"
#define SUCCESS ((tecoBool)-1)