mirror of
https://github.com/irssi/irssi.git
synced 2026-08-10 12:23:37 +02:00
Irssi now detects a paste if it reads at least three bytes in a single read;
subsequent reads are associated to the same paste if they happen before 'paste_detect_time' time since the last read. If no read occurs after 'paste_detect_time' time the paste buffer is flushed; if there is at least one complete line its content is sent as a paste, otherwise it is processed normally. Thanks to Emanuele Giaquinta. git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@5121 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
59142d845d
commit
3eea03ccb8
4 changed files with 66 additions and 129 deletions
|
|
@ -381,7 +381,7 @@ void term_set_input_type(int type)
|
|||
{
|
||||
}
|
||||
|
||||
void term_gets(void)
|
||||
void term_gets(GArray *buffer, int *line_count)
|
||||
{
|
||||
#ifdef WIDEC_CURSES
|
||||
wint_t key;
|
||||
|
|
@ -401,6 +401,8 @@ void term_gets(void)
|
|||
continue;
|
||||
#endif
|
||||
|
||||
signal_emit("gui key pressed", 1, GINT_TO_POINTER(key));
|
||||
g_array_append_val(buffer, key);
|
||||
if (key == '\r' || key == '\n')
|
||||
(*line_count)++;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue