mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05:00
Toggles
This commit is contained in:
parent
72ac27e5a0
commit
f1eead7b4a
@ -66,6 +66,7 @@ static char *paste_old_prompt;
|
|||||||
static int paste_prompt, paste_line_count;
|
static int paste_prompt, paste_line_count;
|
||||||
static int paste_join_multiline;
|
static int paste_join_multiline;
|
||||||
static int paste_timeout_id;
|
static int paste_timeout_id;
|
||||||
|
static int paste_use_bracketed_mode;
|
||||||
static int paste_bracketed_mode;
|
static int paste_bracketed_mode;
|
||||||
|
|
||||||
/* Terminal sequences that surround the input when the terminal has the
|
/* Terminal sequences that surround the input when the terminal has the
|
||||||
@ -662,9 +663,9 @@ static void sig_input(void)
|
|||||||
} else {
|
} else {
|
||||||
term_gets(paste_buffer, &paste_line_count);
|
term_gets(paste_buffer, &paste_line_count);
|
||||||
|
|
||||||
/* use the bracketed paste mode to detect when the user has
|
/* use the bracketed paste mode to detect when the user pastes
|
||||||
* pasted some text into the field. */
|
* some text into the entry */
|
||||||
if (paste_buffer->len > 12) {
|
if (paste_use_bracketed_mode != FALSE && paste_buffer->len > 12) {
|
||||||
/* try to find the start/end sequence */
|
/* try to find the start/end sequence */
|
||||||
int seq_start = memmem(paste_buffer->data,
|
int seq_start = memmem(paste_buffer->data,
|
||||||
paste_buffer->len * g_array_get_element_size(paste_buffer),
|
paste_buffer->len * g_array_get_element_size(paste_buffer),
|
||||||
@ -969,6 +970,7 @@ static void setup_changed(void)
|
|||||||
|
|
||||||
paste_verify_line_count = settings_get_int("paste_verify_line_count");
|
paste_verify_line_count = settings_get_int("paste_verify_line_count");
|
||||||
paste_join_multiline = settings_get_bool("paste_join_multiline");
|
paste_join_multiline = settings_get_bool("paste_join_multiline");
|
||||||
|
paste_use_bracketed_mode = settings_get_bool("paste_use_bracketed_mode");
|
||||||
}
|
}
|
||||||
|
|
||||||
void gui_readline_init(void)
|
void gui_readline_init(void)
|
||||||
@ -990,6 +992,7 @@ void gui_readline_init(void)
|
|||||||
|
|
||||||
settings_add_str("history", "scroll_page_count", "/2");
|
settings_add_str("history", "scroll_page_count", "/2");
|
||||||
settings_add_time("misc", "paste_detect_time", "5msecs");
|
settings_add_time("misc", "paste_detect_time", "5msecs");
|
||||||
|
settings_add_bool("misc", "paste_use_bracketed_mode", FALSE);
|
||||||
/* NOTE: function keys can generate at least 5 characters long
|
/* NOTE: function keys can generate at least 5 characters long
|
||||||
keycodes. this must be larger to allow them to work. */
|
keycodes. this must be larger to allow them to work. */
|
||||||
settings_add_int("misc", "paste_verify_line_count", 5);
|
settings_add_int("misc", "paste_verify_line_count", 5);
|
||||||
|
Loading…
Reference in New Issue
Block a user