~ubuntu-branches/ubuntu/oneiric/irssi/oneiric

« back to all changes in this revision

Viewing changes to src/fe-text/gui-readline.c

  • Committer: Bazaar Package Importer
  • Author(s): Andres Rodriguez
  • Date: 2009-05-05 15:50:50 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20090505155050-aoqlnpes7che9rtd
Tags: 0.8.13-1ubuntu1
* Merge from debian unstable (LP: #372411), remaining changes:
  - debian/patches: 03firsttimer_text
    + Adapt it so it tells you about connecting to irc.ubuntu.com and
      joining #ubuntu instead of irc.debian.org and #debian.
  - debian/patches: 90irc-ubuntu-com
* Fixed debian/patches/90irc-ubuntu-com for new irssi.conf.

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
#include "completion.h"
31
31
#include "command-history.h"
32
32
#include "keyboard.h"
33
 
#include "translation.h"
34
33
#include "printtext.h"
35
34
 
36
35
#include "term.h"
59
58
 
60
59
static int paste_detect_time, paste_detect_keycount, paste_verify_line_count;
61
60
static int paste_state, paste_keycount;
62
 
static char *paste_entry, *prev_entry;
63
 
static int paste_entry_pos, prev_entry_pos;
 
61
static char *paste_entry;
 
62
static int paste_entry_pos;
64
63
static GArray *paste_buffer;
65
64
 
66
65
static char *paste_old_prompt;
71
70
 
72
71
void input_listen_init(int handle)
73
72
{
74
 
        GIOChannel *stdin_channel;
75
 
 
76
 
        stdin_channel = g_io_channel_unix_new(handle);
77
 
        readtag = g_input_add_full(stdin_channel,
 
73
        readtag = g_input_add_poll(handle,
78
74
                                   G_PRIORITY_HIGH, G_INPUT_READ,
79
75
                                   (GInputFunction) sig_input, NULL);
80
 
        g_io_channel_unref(stdin_channel);
81
76
}
82
77
 
83
78
void input_listen_deinit(void)
283
278
                history = command_history_current(active_win);
284
279
                command_history_add(history, text);
285
280
 
286
 
                translate_output(text);
287
281
                signal_emit("send command", 3, text,
288
282
                            active_win->active_server, active_win->active);
289
283
                g_free(text);
296
290
                        history = command_history_current(active_win);
297
291
                        command_history_add(history, str->str);
298
292
 
299
 
                        translate_output(str->str);
300
293
                        signal_emit("send command", 3, str->str,
301
294
                                    active_win->active_server,
302
295
                                    active_win->active);
303
296
                        g_string_truncate(str, 0);
304
297
                } else if (active_entry->utf8) {
305
 
                        out[utf16_char_to_utf8(arr[i], out)] = '\0';
 
298
                        out[g_unichar_to_utf8(arr[i], out)] = '\0';
306
299
                        g_string_append(str, out);
307
300
                } else if (term_type == TERM_TYPE_BIG5) {
308
301
                        if (arr[i] > 0xff)
333
326
 
334
327
        paste_line_count = 0;
335
328
        paste_state = 0;
336
 
        paste_keycount = 0;
337
329
 
338
330
        gui_entry_redraw(active_entry);
339
331
}
340
332
 
 
333
static void insert_paste_prompt(void)
 
334
{
 
335
        char *str;
 
336
 
 
337
        paste_prompt = TRUE;
 
338
        paste_old_prompt = g_strdup(active_entry->prompt);
 
339
        printformat_window(active_win, MSGLEVEL_CLIENTNOTICE,
 
340
                           TXT_PASTE_WARNING,
 
341
                           paste_line_count,
 
342
                           active_win->active == NULL ? "window" :
 
343
                           active_win->active->visible_name);
 
344
 
 
345
        str = format_get_text(MODULE_NAME, active_win, NULL, NULL,
 
346
                              TXT_PASTE_PROMPT, 0, 0);
 
347
        gui_entry_set_prompt(active_entry, str);
 
348
        gui_entry_set_text(active_entry, "");
 
349
        g_free(str);
 
350
}
 
351
 
341
352
static gboolean paste_timeout(gpointer data)
342
353
{
343
354
        GTimeVal now;
344
 
        char *str;
345
355
        int diff;
346
356
 
347
357
        if (paste_state == 0) {
363
373
                /* paste without asking */
364
374
                paste_flush(TRUE);
365
375
        } else if (!paste_prompt) {
366
 
                paste_prompt = TRUE;
367
 
                paste_old_prompt = g_strdup(active_entry->prompt);
368
 
                printformat_window(active_win, MSGLEVEL_CLIENTNOTICE,
369
 
                                   TXT_PASTE_WARNING,
370
 
                                   paste_line_count,
371
 
                                   active_win->active == NULL ? "window" :
372
 
                                   active_win->active->visible_name);
373
 
 
374
 
                str = format_get_text(MODULE_NAME, active_win, NULL, NULL,
375
 
                                      TXT_PASTE_PROMPT, 0, 0);
376
 
                gui_entry_set_prompt(active_entry, str);
377
 
                gui_entry_set_text(active_entry, "");
378
 
                g_free(str);
 
376
                insert_paste_prompt();
379
377
        }
380
378
        return TRUE;
381
379
}
391
389
                        return FALSE;
392
390
 
393
391
                g_free(paste_entry);
394
 
                paste_entry = g_strdup(prev_entry);
395
 
                paste_entry_pos = prev_entry_pos;
 
392
                paste_entry = gui_entry_get_text(active_entry);
 
393
                paste_entry_pos = gui_entry_get_pos(active_entry);
396
394
 
397
395
                paste_state++;
398
396
                paste_line_count = 0;
400
398
                g_array_set_size(paste_buffer, 0);
401
399
                if (prev_key != '\r' && prev_key != '\n') {
402
400
                        paste_keycount++;
403
 
                        g_array_append_val(paste_buffer, prev_key);
404
401
                }
405
402
        } else if (paste_state > 0 && diff > paste_detect_time &&
406
403
                   paste_line_count == 0) {
407
404
                /* reset paste state */
408
405
                paste_state = 0;
409
 
                paste_keycount = 0;
410
406
                return FALSE;
411
407
        }
412
408
 
413
409
        /* continuing quick hits */
414
 
        if ((key == 11 || key == 3) && paste_prompt) {
415
 
                paste_flush(key == 11);
 
410
        if (paste_prompt) {
 
411
                if (key == 11 || key == 3)
 
412
                        paste_flush(key == 11);
416
413
                return TRUE;
417
414
        }
418
415
 
419
416
        g_array_append_val(paste_buffer, key);
420
417
        if ((key == '\r' || key == '\n') &&
421
418
            (prev_key != '\r' && prev_key != '\n')) {
422
 
                if (paste_state == 1 &&
423
 
                    paste_keycount < paste_detect_keycount) {
424
 
                        /* not enough keypresses to determine if this is
425
 
                           pasting or not. don't reset paste keycount, but
426
 
                           send this line as non-pasted */
427
 
                        g_array_set_size(paste_buffer, 0);
428
 
                        *paste_entry = '\0';
429
 
                        return FALSE;
430
 
                }
431
 
 
432
 
                /* newline - assume this line was pasted */
433
419
                if (paste_state == 1) {
 
420
                        if (paste_keycount < paste_detect_keycount) {
 
421
                                /* not enough keypresses to determine if this is
 
422
                                   pasting or not. don't reset paste_keycount, but
 
423
                                   send this line as non-pasted */
 
424
                                g_array_set_size(paste_buffer, 0);
 
425
                                *paste_entry = '\0';
 
426
                                return FALSE;
 
427
                        }
 
428
 
 
429
                        /* newline - assume this line was pasted */
434
430
                        paste_state = 2;
435
431
                        gui_entry_set_text(active_entry, paste_entry);
436
432
                        gui_entry_set_pos(active_entry, paste_entry_pos);
494
490
                }
495
491
        } else {
496
492
                /* need to convert to utf8 */
497
 
                str[utf16_char_to_utf8(key, str)] = '\0';
 
493
                str[g_unichar_to_utf8(key, str)] = '\0';
498
494
        }
499
495
 
500
496
        if (strcmp(str, "^") == 0) {
503
499
                str[2] = '\0';
504
500
        }
505
501
 
506
 
        g_free(prev_entry);
507
 
        prev_entry = gui_entry_get_text(active_entry);
508
 
        prev_entry_pos = gui_entry_get_pos(active_entry);
509
 
 
510
502
        if (escape_next_key) {
511
503
                escape_next_key = FALSE;
512
504
                gui_entry_insert_char(active_entry, key);
535
527
static void key_send_line(void)
536
528
{
537
529
        HISTORY_REC *history;
538
 
        char *str, *add_history;
 
530
        char *str;
 
531
        int add_history;
539
532
 
540
533
        str = gui_entry_get_text(active_entry);
541
534
 
542
535
        /* we can't use gui_entry_get_text() later, since the entry might
543
536
           have been destroyed after we get back */
544
 
        add_history = *str == '\0' ? NULL : g_strdup(str);
 
537
        add_history = *str != '\0';
545
538
        history = command_history_current(active_win);
546
539
 
547
 
        translate_output(str);
548
 
 
549
540
        if (redir == NULL) {
550
541
                signal_emit("send command", 3, str,
551
542
                            active_win->active_server,
552
543
                            active_win->active);
553
544
        } else {
554
545
                if (redir->flags & ENTRY_REDIRECT_FLAG_HIDDEN)
555
 
                        g_free_and_null(add_history);
 
546
                        add_history = 0;
556
547
                handle_entry_redirect(str);
557
548
        }
558
549
 
559
 
        if (add_history != NULL) {
 
550
        if (add_history) {
560
551
                history = command_history_find(history);
561
552
                if (history != NULL)
562
 
                        command_history_add(history, add_history);
563
 
                g_free(add_history);
 
553
                        command_history_add(history, str);
564
554
        }
565
555
 
566
556
        if (active_entry != NULL)
728
718
 
729
719
static void sig_input(void)
730
720
{
731
 
        unichar buffer[128];
732
 
        int ret, i;
733
 
 
734
721
        if (!active_entry) {
735
722
                /* no active entry yet - wait until we have it */
736
723
                return;
737
724
        }
738
725
 
739
 
        ret = term_gets(buffer, sizeof(buffer)/sizeof(buffer[0]));
740
 
        if (ret == -1) {
741
 
                /* lost terminal */
742
 
                if (!term_detached)
743
 
                        signal_emit("command quit", 1, "Lost terminal");
744
 
        } else {
745
 
                for (i = 0; i < ret; i++) {
746
 
                        signal_emit("gui key pressed", 1,
747
 
                                    GINT_TO_POINTER(buffer[i]));
748
 
                }
749
 
        }
 
726
        term_gets();
750
727
}
751
728
 
752
729
time_t get_idle_time(void)
779
756
        signal_emit("command window goto", 3, data, active_win->active_server, active_win->active);
780
757
}
781
758
 
782
 
static void key_completion(int erase)
 
759
static void key_completion(int erase, int backward)
783
760
{
784
761
        char *text, *line;
785
762
        int pos;
786
763
 
787
764
        text = gui_entry_get_text_and_pos(active_entry, &pos);
788
 
        line = word_complete(active_win, text, &pos, erase);
 
765
        line = word_complete(active_win, text, &pos, erase, backward);
789
766
        g_free(text);
790
767
 
791
768
        if (line != NULL) {
795
772
        }
796
773
}
797
774
 
 
775
static void key_word_completion_backward(void)
 
776
{
 
777
        key_completion(FALSE, TRUE);
 
778
}
 
779
 
798
780
static void key_word_completion(void)
799
781
{
800
 
        key_completion(FALSE);
 
782
        key_completion(FALSE, FALSE);
801
783
}
802
784
 
803
785
static void key_erase_completion(void)
804
786
{
805
 
        key_completion(TRUE);
 
787
        key_completion(TRUE, FALSE);
806
788
}
807
789
 
808
790
static void key_check_replaces(void)
1023
1005
 
1024
1006
        escape_next_key = FALSE;
1025
1007
        redir = NULL;
1026
 
        prev_entry = NULL;
1027
1008
        paste_state = 0;
1028
1009
        paste_keycount = 0;
1029
1010
        paste_entry = NULL;
1097
1078
        key_bind("key", NULL, "meta-right", "mright", (SIGNAL_FUNC) key_combo);
1098
1079
 
1099
1080
        /* cursor movement */
1100
 
        key_bind("backward_character", "", "left", NULL, (SIGNAL_FUNC) key_backward_character);
1101
 
        key_bind("forward_character", "", "right", NULL, (SIGNAL_FUNC) key_forward_character);
1102
 
        key_bind("backward_word", "", "cleft", NULL, (SIGNAL_FUNC) key_backward_word);
 
1081
        key_bind("backward_character", "Move the cursor a character backward", "left", NULL, (SIGNAL_FUNC) key_backward_character);
 
1082
        key_bind("forward_character", "Move the cursor a character forward", "right", NULL, (SIGNAL_FUNC) key_forward_character);
 
1083
        key_bind("backward_word", "Move the cursor a word backward", "cleft", NULL, (SIGNAL_FUNC) key_backward_word);
1103
1084
        key_bind("backward_word", NULL, "meta-b", NULL, (SIGNAL_FUNC) key_backward_word);
1104
 
        key_bind("forward_word", "", "cright", NULL, (SIGNAL_FUNC) key_forward_word);
 
1085
        key_bind("forward_word", "Move the cursor a word forward", "cright", NULL, (SIGNAL_FUNC) key_forward_word);
1105
1086
        key_bind("forward_word", NULL, "meta-f", NULL, (SIGNAL_FUNC) key_forward_word);
1106
 
        key_bind("backward_to_space", "", NULL, NULL, (SIGNAL_FUNC) key_backward_to_space);
1107
 
        key_bind("forward_to_space", "", NULL, NULL, (SIGNAL_FUNC) key_forward_to_space);
1108
 
        key_bind("beginning_of_line", "", "home", NULL, (SIGNAL_FUNC) key_beginning_of_line);
 
1087
        key_bind("backward_to_space", "Move the cursor backward to a space", NULL, NULL, (SIGNAL_FUNC) key_backward_to_space);
 
1088
        key_bind("forward_to_space", "Move the cursor forward to a space", NULL, NULL, (SIGNAL_FUNC) key_forward_to_space);
 
1089
        key_bind("beginning_of_line", "Move the cursor to the beginning of the line", "home", NULL, (SIGNAL_FUNC) key_beginning_of_line);
1109
1090
        key_bind("beginning_of_line", NULL, "^A", NULL, (SIGNAL_FUNC) key_beginning_of_line);
1110
 
        key_bind("end_of_line", "", "end", NULL, (SIGNAL_FUNC) key_end_of_line);
 
1091
        key_bind("end_of_line", "Move the cursor to the end of the line", "end", NULL, (SIGNAL_FUNC) key_end_of_line);
1111
1092
        key_bind("end_of_line", NULL, "^E", NULL, (SIGNAL_FUNC) key_end_of_line);
1112
1093
 
1113
1094
        /* history */
1114
 
        key_bind("backward_history", "", "up", NULL, (SIGNAL_FUNC) key_backward_history);
1115
 
        key_bind("forward_history", "", "down", NULL, (SIGNAL_FUNC) key_forward_history);
 
1095
        key_bind("backward_history", "Go back one line in the history", "up", NULL, (SIGNAL_FUNC) key_backward_history);
 
1096
        key_bind("forward_history", "Go forward one line in the history", "down", NULL, (SIGNAL_FUNC) key_forward_history);
1116
1097
 
1117
1098
        /* line editing */
1118
 
        key_bind("backspace", "", "backspace", NULL, (SIGNAL_FUNC) key_backspace);
1119
 
        key_bind("delete_character", "", "delete", NULL, (SIGNAL_FUNC) key_delete_character);
 
1099
        key_bind("backspace", "Delete the previous character", "backspace", NULL, (SIGNAL_FUNC) key_backspace);
 
1100
        key_bind("delete_character", "Delete the current character", "delete", NULL, (SIGNAL_FUNC) key_delete_character);
1120
1101
        key_bind("delete_character", NULL, "^D", NULL, (SIGNAL_FUNC) key_delete_character);
1121
 
        key_bind("delete_next_word", "", "meta-d", NULL, (SIGNAL_FUNC) key_delete_next_word);
1122
 
        key_bind("delete_previous_word", "", "meta-backspace", NULL, (SIGNAL_FUNC) key_delete_previous_word);
1123
 
        key_bind("delete_to_previous_space", "", "^W", NULL, (SIGNAL_FUNC) key_delete_to_previous_space);
1124
 
        key_bind("delete_to_next_space", "", "", NULL, (SIGNAL_FUNC) key_delete_to_next_space);
1125
 
        key_bind("erase_line", "", "^U", NULL, (SIGNAL_FUNC) key_erase_line);
1126
 
        key_bind("erase_to_beg_of_line", "", NULL, NULL, (SIGNAL_FUNC) key_erase_to_beg_of_line);
1127
 
        key_bind("erase_to_end_of_line", "", "^K", NULL, (SIGNAL_FUNC) key_erase_to_end_of_line);
1128
 
        key_bind("yank_from_cutbuffer", "", "^Y", NULL, (SIGNAL_FUNC) key_yank_from_cutbuffer);
 
1102
        key_bind("delete_next_word", "Delete the word after the cursor", "meta-d", NULL, (SIGNAL_FUNC) key_delete_next_word);
 
1103
        key_bind("delete_previous_word", "Delete the word before the cursor", "meta-backspace", NULL, (SIGNAL_FUNC) key_delete_previous_word);
 
1104
        key_bind("delete_to_previous_space", "Delete up to the previous space", "^W", NULL, (SIGNAL_FUNC) key_delete_to_previous_space);
 
1105
        key_bind("delete_to_next_space", "Delete up to the next space", "", NULL, (SIGNAL_FUNC) key_delete_to_next_space);
 
1106
        key_bind("erase_line", "Erase the whole input line", "^U", NULL, (SIGNAL_FUNC) key_erase_line);
 
1107
        key_bind("erase_to_beg_of_line", "Erase everything before the cursor", NULL, NULL, (SIGNAL_FUNC) key_erase_to_beg_of_line);
 
1108
        key_bind("erase_to_end_of_line", "Erase everything after the cursor", "^K", NULL, (SIGNAL_FUNC) key_erase_to_end_of_line);
 
1109
        key_bind("yank_from_cutbuffer", "\"Undelete\", paste the last deleted text", "^Y", NULL, (SIGNAL_FUNC) key_yank_from_cutbuffer);
1129
1110
        key_bind("transpose_characters", "Swap current and previous character", "^T", NULL, (SIGNAL_FUNC) key_transpose_characters);
1130
1111
        key_bind("transpose_words", "Swap current and previous word", NULL, NULL, (SIGNAL_FUNC) key_transpose_words);
1131
 
        key_bind("capitalize_word", "Capitalize word", NULL, NULL, (SIGNAL_FUNC) key_capitalize_word);
1132
 
        key_bind("downcase_word", "Downcase word", NULL, NULL, (SIGNAL_FUNC) key_downcase_word);
1133
 
        key_bind("upcase_word", "Upcase word", NULL, NULL, (SIGNAL_FUNC) key_upcase_word);
 
1112
        key_bind("capitalize_word", "Capitalize the current word", NULL, NULL, (SIGNAL_FUNC) key_capitalize_word);
 
1113
        key_bind("downcase_word", "Downcase the current word", NULL, NULL, (SIGNAL_FUNC) key_downcase_word);
 
1114
        key_bind("upcase_word", "Upcase the current word", NULL, NULL, (SIGNAL_FUNC) key_upcase_word);
1134
1115
 
1135
1116
        /* line transmitting */
1136
1117
        key_bind("send_line", "Execute the input line", "return", NULL, (SIGNAL_FUNC) key_send_line);
1137
 
        key_bind("word_completion", "", "tab", NULL, (SIGNAL_FUNC) key_word_completion);
1138
 
        key_bind("erase_completion", "", "meta-k", NULL, (SIGNAL_FUNC) key_erase_completion);
 
1118
        key_bind("word_completion_backward", "", NULL, NULL, (SIGNAL_FUNC) key_word_completion_backward);
 
1119
        key_bind("word_completion", "Complete the current word", "tab", NULL, (SIGNAL_FUNC) key_word_completion);
 
1120
        key_bind("erase_completion", "Remove the completion added by word_completion", "meta-k", NULL, (SIGNAL_FUNC) key_erase_completion);
1139
1121
        key_bind("check_replaces", "Check word replaces", NULL, NULL, (SIGNAL_FUNC) key_check_replaces);
1140
1122
 
1141
1123
        /* window managing */
1142
 
        key_bind("previous_window", "Previous window", "^P", NULL, (SIGNAL_FUNC) key_previous_window);
1143
 
        key_bind("next_window", "Next window", "^N", NULL, (SIGNAL_FUNC) key_next_window);
1144
 
        key_bind("upper_window", "Upper window", "mup", NULL, (SIGNAL_FUNC) key_upper_window);
1145
 
        key_bind("lower_window", "Lower window", "mdown", NULL, (SIGNAL_FUNC) key_lower_window);
1146
 
        key_bind("left_window", "Window in left", "mleft", NULL, (SIGNAL_FUNC) key_left_window);
1147
 
        key_bind("right_window", "Window in right", "mright", NULL, (SIGNAL_FUNC) key_right_window);
 
1124
        key_bind("previous_window", "Go to the previous window", "^P", NULL, (SIGNAL_FUNC) key_previous_window);
 
1125
        key_bind("next_window", "Go to the next window", "^N", NULL, (SIGNAL_FUNC) key_next_window);
 
1126
        key_bind("upper_window", "Go to the split window above", "mup", NULL, (SIGNAL_FUNC) key_upper_window);
 
1127
        key_bind("lower_window", "Go to the split window below", "mdown", NULL, (SIGNAL_FUNC) key_lower_window);
 
1128
        key_bind("left_window", "Go to the previous window in the current split window", "mleft", NULL, (SIGNAL_FUNC) key_left_window);
 
1129
        key_bind("right_window", "Go to the next window in the current split window", "mright", NULL, (SIGNAL_FUNC) key_right_window);
1148
1130
        key_bind("active_window", "Go to next window with the highest activity", "meta-a", NULL, (SIGNAL_FUNC) key_active_window);
1149
 
        key_bind("next_window_item", "Next channel/query", "^X", NULL, (SIGNAL_FUNC) key_next_window_item);
1150
 
        key_bind("previous_window_item", "Previous channel/query", NULL, NULL, (SIGNAL_FUNC) key_previous_window_item);
 
1131
        key_bind("next_window_item", "Go to the next channel/query. In empty windows change to the next server", "^X", NULL, (SIGNAL_FUNC) key_next_window_item);
 
1132
        key_bind("previous_window_item", "Go to the previous channel/query. In empty windows change to the previous server", NULL, NULL, (SIGNAL_FUNC) key_previous_window_item);
1151
1133
 
1152
1134
        key_bind("refresh_screen", "Redraw screen", "^L", NULL, (SIGNAL_FUNC) irssi_redraw);
1153
 
        key_bind("scroll_backward", "Previous page", "prior", NULL, (SIGNAL_FUNC) key_scroll_backward);
 
1135
        key_bind("scroll_backward", "Scroll to previous page", "prior", NULL, (SIGNAL_FUNC) key_scroll_backward);
1154
1136
        key_bind("scroll_backward", NULL, "meta-p", NULL, (SIGNAL_FUNC) key_scroll_backward);
1155
 
        key_bind("scroll_forward", "Next page", "next", NULL, (SIGNAL_FUNC) key_scroll_forward);
 
1137
        key_bind("scroll_forward", "Scroll to next page", "next", NULL, (SIGNAL_FUNC) key_scroll_forward);
1156
1138
        key_bind("scroll_forward", NULL, "meta-n", NULL, (SIGNAL_FUNC) key_scroll_forward);
1157
 
        key_bind("scroll_start", "Beginning of the window", "", NULL, (SIGNAL_FUNC) key_scroll_start);
1158
 
        key_bind("scroll_end", "End of the window", "", NULL, (SIGNAL_FUNC) key_scroll_end);
 
1139
        key_bind("scroll_start", "Scroll to the beginning of the window", "", NULL, (SIGNAL_FUNC) key_scroll_start);
 
1140
        key_bind("scroll_end", "Scroll to the end of the window", "", NULL, (SIGNAL_FUNC) key_scroll_end);
1159
1141
 
1160
1142
        /* inserting special input characters to line.. */
1161
 
        key_bind("escape_char", "Escape the next keypress", NULL, NULL, (SIGNAL_FUNC) key_escape);
 
1143
        key_bind("escape_char", "Insert the next character exactly as-is to input line", NULL, NULL, (SIGNAL_FUNC) key_escape);
1162
1144
        key_bind("insert_text", "Append text to line", NULL, NULL, (SIGNAL_FUNC) key_insert_text);
1163
1145
 
1164
1146
        /* autoreplaces */
1220
1202
        key_unbind("upcase_word", (SIGNAL_FUNC) key_upcase_word);
1221
1203
 
1222
1204
        key_unbind("send_line", (SIGNAL_FUNC) key_send_line);
 
1205
        key_unbind("word_completion_backward", (SIGNAL_FUNC) key_word_completion_backward);
1223
1206
        key_unbind("word_completion", (SIGNAL_FUNC) key_word_completion);
1224
1207
        key_unbind("erase_completion", (SIGNAL_FUNC) key_erase_completion);
1225
1208
        key_unbind("check_replaces", (SIGNAL_FUNC) key_check_replaces);