Irssi core bugs

Notice: Undefined index: tasklist_type in /var/www/ : eval()'d code on line 85 Notice: Undefined index: tasklist_type in /var/www/ : eval()'d code on line 90
  • Status Unconfirmed
  • Percent Complete
  • Task Type Bug Report
  • Category core
  • Assigned To No-one
  • Operating System Linux
  • Severity Medium
  • Priority Normal
  • Reported Version irssi 0.8.14
  • Due in Version Undecided
  • Due Date Undecided
  • Votes 0
  • Private No
Attached to Project: Irssi core bugs
Opened by Will Gray (graywh) - 2009-11-09

FS#721 - binding ctrl-^

When I tried to bind ctrl-^ with the following "/bind ^^ command window last", the event was triggered by both ctrl-^ and ^. I looked at the sourced code and found the reason. When I removed it, I was able to bind ctrl-^ and ^ was unaffected.

In src/fe-text/gui-readline.c:

if (strcmp(str, "^") == 0 {
/* change it as ^^ */
str[1] = '^';
str[2] = '\0';

This task does not depend on any other tasks.

Will Gray (graywh)
Monday, 09 November 2009, 23:14 GMT
I see that revision 2796 introduced this code. I would argue this is a terrible hack to allow binding of ^ because of this side-effect. Perhaps some other code could be improved instead.
Wouter Coekaerts (coekie)
Wednesday, 14 April 2010, 19:44 GMT
Which terminal are you using? For me, in Konsole and xterm ctrl-^ just sends ^ to the app in the terminal, so there is no way to distinguish them.
Easiest way to test this is to start "cat" (no arguments) and see what it prints when you press it.
Will Gray (graywh)
Monday, 30 April 2012, 15:22 GMT
I'm using Xterm. If you hit ctrl-^ in cat, it should display ^^. This should work in every terminal emulator, including Konsole.

Yes, it's possible to distinguish ^ and ctrl-^--Vim does it just fine. When I delete that block and re-compile, Irssi can distinguish ^ and ctrl-^ too.