# HG changeset patch # User Sadrul Habib Chowdhury # Date 1221878713 0 # Node ID dc8fac020fada4bab47b27ffa1a8b636e23cc5bc # Parent f3788288961b77e81868e2d95cab095ddc6e1129 Fix a bug where some key-bindings wouldn't work with some . diff -r f3788288961b -r dc8fac020fad ChangeLog --- a/ChangeLog Fri Sep 19 14:36:44 2008 +0000 +++ b/ChangeLog Sat Sep 20 02:45:13 2008 +0000 @@ -17,6 +17,8 @@ Finch: * A new 'Nested Grouping' option in the 'Grouping' plugin. Group hierarchies are defined by the '/' character in the group names + * A bug was fixed where some key-bindings wouldn't work with some TERMs + (e.g. xterm-color, screen-linux etc.) version 2.5.1 (08/30/2008): libpurple: diff -r f3788288961b -r dc8fac020fad finch/libgnt/gntkeys.c --- a/finch/libgnt/gntkeys.c Fri Sep 19 14:36:44 2008 +0000 +++ b/finch/libgnt/gntkeys.c Sat Sep 20 02:45:13 2008 +0000 @@ -47,12 +47,12 @@ term = ""; /* Just in case */ } - if (strcmp(term, "xterm") == 0 || strcmp(term, "rxvt") == 0) { + if (strstr(term, "xterm") == term || strcmp(term, "rxvt") == 0) { gnt_key_cup = "\033" "[1;5A"; gnt_key_cdown = "\033" "[1;5B"; gnt_key_cright = "\033" "[1;5C"; gnt_key_cleft = "\033" "[1;5D"; - } else if (strcmp(term, "screen") == 0 || strcmp(term, "rxvt-unicode") == 0) { + } else if (strstr(term, "screen") == term || strcmp(term, "rxvt-unicode") == 0) { gnt_key_cup = "\033" "Oa"; gnt_key_cdown = "\033" "Ob"; gnt_key_cright = "\033" "Oc"; @@ -147,11 +147,11 @@ if (*text == 27 && *(text + 1) == '[' && (*(text + 2) >= 'A' && *(text + 2) <= 'D')) { /* Apparently this is necessary for urxvt and screen and xterm */ - if (strcmp(term, "screen") == 0 || strcmp(term, "rxvt-unicode") == 0 || - strcmp(term, "xterm") == 0) + if (strstr(term, "screen") == term || strcmp(term, "rxvt-unicode") == 0 || + strstr(term, "xterm") == term) *(text + 1) = 'O'; } else if (*(unsigned char*)text == 195) { - if (*(text + 2) == 0 && strcmp(term, "xterm") == 0) { + if (*(text + 2) == 0 && strstr(term, "xterm") == term) { *(text) = 27; *(text + 1) -= 64; /* Say wha? */ }