ui: Fix out_flush/ui_write behavior to always flush for abstract_ui

This commit is contained in:
Thiago de Arruda 2015-01-10 02:37:22 -03:00
parent e3b2907f2f
commit e1da130ca9
2 changed files with 7 additions and 6 deletions

View File

@ -1823,12 +1823,9 @@ static int out_pos = 0; /* number of chars in out_buf */
*/
void out_flush(void)
{
if (out_pos != 0) {
/* set out_pos to 0 before ui_write, to avoid recursiveness */
int len = out_pos;
out_pos = 0;
ui_write(out_buf, len);
}
int len = out_pos;
out_pos = 0;
ui_write(out_buf, len);
}
/*

View File

@ -95,6 +95,10 @@ void ui_write(uint8_t *s, int len)
return;
}
if (!len) {
return;
}
char_u *tofree = NULL;
if (output_conv.vc_type != CONV_NONE) {