summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/libunix.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2013-05-26 05:21:34 +0200
committerAdam Borowski <kilobyte@angband.pl>2013-05-26 05:21:34 +0200
commitcc10e91b2a4ca1920de6d6d5090ccf0ca071cc86 (patch)
tree6063c1dbcb681c66f1f7f5d95c63c3c2ed0ea8b3 /crawl-ref/source/libunix.cc
parent2560baa3b23bb7682484d117dfdf000ab0a60938 (diff)
downloadcrawl-ref-cc10e91b2a4ca1920de6d6d5090ccf0ca071cc86.tar.gz
crawl-ref-cc10e91b2a4ca1920de6d6d5090ccf0ca071cc86.zip
Expand the kbs comment.
Diffstat (limited to 'crawl-ref/source/libunix.cc')
-rw-r--r--crawl-ref/source/libunix.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/crawl-ref/source/libunix.cc b/crawl-ref/source/libunix.cc
index eeb8419d55..14a01558ca 100644
--- a/crawl-ref/source/libunix.cc
+++ b/crawl-ref/source/libunix.cc
@@ -386,8 +386,12 @@ int unixcurses_get_vi_key(int keyin)
case KEY_SRIGHT: return 'L';
case KEY_BTAB: return CK_SHIFT_TAB;
case KEY_BACKSPACE:
- // If key_backspace (kbs) is ctrl-h, curses generates KEY_BACKSPACE
- // for the ctrl-h key. Work around that by converting back to CK_BKSP.
+ // If terminfo's entry for backspace (kbs) is ctrl-h, curses
+ // generates KEY_BACKSPACE for the ctrl-h key. Work around that by
+ // converting back to CK_BKSP.
+ // Note that this mangling occurs entirely on the machine Crawl runs
+ // on (and even within crawl's process) rather than where the user's
+ // terminal is, so this check is reliable.
static const char * const kbs = tigetstr("kbs");
static const int bskey = (kbs && kbs != (const char *) -1
&& kbs == string("\010")) ? CK_BKSP