1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-04 08:43:13 +02:00

core: flush stdout/stderr after sending text directly on them (fix corrupted data sent to hook_process() callback) (closes #442)

This commit is contained in:
Sébastien Helleu
2015-07-25 09:16:08 +02:00
parent b99a630705
commit 7572fec261
7 changed files with 18 additions and 3 deletions
+4 -1
View File
@@ -465,7 +465,10 @@ gui_key_flush (int paste)
* found
*/
if (CONFIG_BOOLEAN(config_look_search_text_not_found_alert))
printf ("\a");
{
fprintf (stderr, "\a");
fflush (stderr);
}
}
else
{
+2
View File
@@ -89,6 +89,7 @@ gui_mouse_enable ()
{
gui_mouse_enabled = 1;
fprintf (stderr, "\033[?1005h\033[?1000h\033[?1002h");
fflush (stderr);
(void) hook_signal_send ("mouse_enabled",
WEECHAT_HOOK_SIGNAL_STRING, NULL);
@@ -103,6 +104,7 @@ gui_mouse_disable ()
{
gui_mouse_enabled = 0;
fprintf (stderr, "\033[?1002l\033[?1000l\033[?1005l");
fflush (stderr);
(void) hook_signal_send ("mouse_disabled",
WEECHAT_HOOK_SIGNAL_STRING, NULL);
+2
View File
@@ -2521,6 +2521,7 @@ gui_window_send_clipboard (const char *storage_unit, const char *text)
fprintf (stderr, "\033]52;%s;%s\a",
(storage_unit) ? storage_unit : "",
text_base64);
fflush (stderr);
free (text_base64);
}
}
@@ -2545,6 +2546,7 @@ gui_window_set_bracketed_paste_mode (int enable)
(screen) ? "\033P" : "",
(enable) ? "h" : "l",
(screen) ? "\033\\" : "");
fflush (stderr);
}
/*