summaryrefslogtreecommitdiff
path: root/src/sysdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sysdep.c')
-rw-r--r--src/sysdep.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/sysdep.c b/src/sysdep.c
index efd9638b07a..abb385d1388 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -1304,7 +1304,10 @@ init_sys_modes (struct tty_display_info *tty_out)
}
#endif /* F_GETOWN */
- setvbuf (tty_out->output, NULL, _IOFBF, BUFSIZ);
+ const size_t buffer_size = (tty_out->output_buffer_size
+ ? tty_out->output_buffer_size
+ : BUFSIZ);
+ setvbuf (tty_out->output, NULL, _IOFBF, buffer_size);
if (tty_out->terminal->set_terminal_modes_hook)
tty_out->terminal->set_terminal_modes_hook (tty_out->terminal);