diff options
author | Timo Sirainen <cras@irssi.org> | 2003-11-17 18:36:56 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2003-11-17 18:36:56 +0000 |
commit | 787b3103333775b30be3f476bca17ffb493ace67 (patch) | |
tree | 58e7975b4baa5e1dbdfb7bcadf2771cc500807d2 /src/fe-text/gui-readline.c | |
parent | 20867658eba23b525a0a6ddb9c0e0bbdf7fce99d (diff) | |
download | irssi-787b3103333775b30be3f476bca17ffb493ace67.zip |
disabling paste detection works again
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3176 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-text/gui-readline.c')
-rw-r--r-- | src/fe-text/gui-readline.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/fe-text/gui-readline.c b/src/fe-text/gui-readline.c index c494ee68..65e9be44 100644 --- a/src/fe-text/gui-readline.c +++ b/src/fe-text/gui-readline.c @@ -40,8 +40,6 @@ #include <signal.h> -#define PASTE_MAX_KEYCOUNT 100 - typedef void (*ENTRY_REDIRECT_KEY_FUNC) (int key, void *data, SERVER_REC *server, WI_ITEM_REC *item); typedef void (*ENTRY_REDIRECT_ENTRY_FUNC) (const char *line, void *data, SERVER_REC *server, WI_ITEM_REC *item); @@ -273,6 +271,9 @@ static int check_pasting(unichar key, int diff) { unsigned int i; + if (paste_state < 0) + return FALSE; + if (paste_state == 0) { /* two keys hit together quick. possibly pasting */ if (diff > paste_detect_time) @@ -884,9 +885,7 @@ static void setup_changed(void) paste_detect_keycount = settings_get_int("paste_detect_keycount"); if (paste_detect_keycount < 2) - paste_detect_keycount = 2; - else if (paste_detect_keycount > PASTE_MAX_KEYCOUNT) - paste_detect_keycount = PASTE_MAX_KEYCOUNT; + paste_state = -1; paste_verify_line_count = settings_get_int("paste_verify_line_count"); } |