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:
parent
15dad291c7
commit
4764b102ff
@ -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)
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user