1
0
mirror of https://github.com/irssi/irssi.git synced 2024-12-04 14:46:39 -05:00

disabling paste detection works again

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3176 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2003-11-17 18:36:56 +00:00 committed by cras
parent 20867658eb
commit 787b310333

View File

@ -40,8 +40,6 @@
#include <signal.h> #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_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); 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; unsigned int i;
if (paste_state < 0)
return FALSE;
if (paste_state == 0) { if (paste_state == 0) {
/* two keys hit together quick. possibly pasting */ /* two keys hit together quick. possibly pasting */
if (diff > paste_detect_time) if (diff > paste_detect_time)
@ -884,9 +885,7 @@ static void setup_changed(void)
paste_detect_keycount = settings_get_int("paste_detect_keycount"); paste_detect_keycount = settings_get_int("paste_detect_keycount");
if (paste_detect_keycount < 2) if (paste_detect_keycount < 2)
paste_detect_keycount = 2; paste_state = -1;
else if (paste_detect_keycount > PASTE_MAX_KEYCOUNT)
paste_detect_keycount = PASTE_MAX_KEYCOUNT;
paste_verify_line_count = settings_get_int("paste_verify_line_count"); paste_verify_line_count = settings_get_int("paste_verify_line_count");
} }