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

Enable the bracketed paste mode on demand

This commit is contained in:
LemonBoy 2015-09-09 22:35:11 +02:00 committed by dequis
parent 15dad291c7
commit 4764b102ff
3 changed files with 13 additions and 0 deletions

View File

@ -969,6 +969,9 @@ static void setup_changed(void)
paste_verify_line_count = settings_get_int("paste_verify_line_count");
paste_join_multiline = settings_get_bool("paste_join_multiline");
paste_use_bracketed_mode = settings_get_bool("paste_use_bracketed_mode");
/* Enable the bracketed paste mode on demand */
term_set_bracketed_paste_mode(paste_use_bracketed_mode);
}
void gui_readline_init(void)

View File

@ -689,3 +689,11 @@ void term_gets(GArray *buffer, int *line_count)
}
}
}
void term_set_bracketed_paste_mode(int enable)
{
if (enable)
tputs("\e[?2004h", 0, term_putchar);
else
tputs("\e[?2004l", 0, term_putchar);
}

View File

@ -94,6 +94,8 @@ void term_refresh(TERM_WINDOW *window);
void term_stop(void);
void term_set_bracketed_paste_mode(int enable);
/* keyboard input handling */
void term_set_input_type(int type);
void term_gets(GArray *buffer, int *line_count);