pidgin: 2a64b5ef: Fix a bug where some key-bindings wouldn...
sadrul at pidgin.im
sadrul at pidgin.im
Fri Sep 19 22:35:33 EDT 2008
-----------------------------------------------------------------
Revision: 2a64b5ef6e2736f642a76866d8524fcca53cbd35
Ancestor: eb26327ae9afb96ee9ffead70b283bd7f5289be8
Author: sadrul at pidgin.im
Date: 2008-09-20T02:45:13
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/2a64b5ef6e2736f642a76866d8524fcca53cbd35
Modified files:
ChangeLog finch/libgnt/gntkeys.c
ChangeLog:
Fix a bug where some key-bindings wouldn't work with some .
-------------- next part --------------
============================================================
--- ChangeLog 0a4cb260f58b246f04b8dc4db3cdb5083baa1481
+++ ChangeLog d01b72c67ca4c926956e44648572c587a008ff24
@@ -17,6 +17,8 @@ version 2.5.2 (??/??/????):
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:
============================================================
--- finch/libgnt/gntkeys.c 94c06e40635dbe91fc1e3862f72b94cfe6082eea
+++ finch/libgnt/gntkeys.c 272d18106794d003431f7817d83f930f60013f4f
@@ -47,12 +47,12 @@ void gnt_init_keys()
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 @@ void gnt_keys_refine(char *text)
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? */
}
More information about the Commits
mailing list