diff options
author | Ailin Nemui <ailin@esf51.localdomain> | 2014-07-28 13:58:13 +0200 |
---|---|---|
committer | Ailin Nemui <ailin@esf51.localdomain> | 2014-07-28 13:58:13 +0200 |
commit | 09f23d06b5262c53b65fa04d4f83cfd170d919c5 (patch) | |
tree | 9869ce2e38775240b5b7a79845c5b35026bdfa31 /src/fe-text/gui-readline.c | |
parent | cb6266f212e35c4ebe954f89cdd0230cf6ec3aba (diff) | |
download | irssi-09f23d06b5262c53b65fa04d4f83cfd170d919c5.zip |
Modify escape of ^ key so it can be used as well as Ctrl+^
Fixes FS#721
This makes Ctrl+^ and ^ bindable again as different keys. We do this
by escaping single `^` as `^-`, which is not a valid control character
(unlike `^^`)
The original approach suggested in FS#721 is insufficient, it will
break bindings such as `meta-^` because Irssi is convinced that `^`
introduces a Control-key ("key combo") so it is waiting for what may
follow.
Diffstat (limited to 'src/fe-text/gui-readline.c')
-rw-r--r-- | src/fe-text/gui-readline.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fe-text/gui-readline.c b/src/fe-text/gui-readline.c index 476a798b..e93f2293 100644 --- a/src/fe-text/gui-readline.c +++ b/src/fe-text/gui-readline.c @@ -393,8 +393,8 @@ static void sig_gui_key_pressed(gpointer keyp) } if (strcmp(str, "^") == 0) { - /* change it as ^^ */ - str[1] = '^'; + /* change it as ^-, that is an invalid control char */ + str[1] = '-'; str[2] = '\0'; } |