File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -354,7 +354,7 @@ namespace sys {
354354 void write_string (stream& io, const char * str, u32 n) {
355355 u32 i = 0 ;
356356 if (&io == &io_for_fd (BASIL_STDOUT_FD)) for (i = 0 ; i < n; i ++) {
357- push_if_necessary (io, 4 );
357+ push_if_necessary (io, 1 );
358358 io.buf [io.end ++] = str[i];
359359 if (str[i] == ' \n ' ) flush_output (io);
360360 }
@@ -371,11 +371,13 @@ namespace sys {
371371 void write_char (stream& io, rune c) {
372372 push_if_necessary (io, 4 );
373373 io.end += utf8_encode (&c, 1 , io.buf + io.end , 4 );
374+ if (&io == &io_for_fd (BASIL_STDOUT_FD) && c == ' \n ' ) flush_output (io);
374375 }
375376
376377 void write_byte (stream& io, u8 c) {
377378 push_if_necessary (io, 1 );
378379 put (io, c);
380+ if (&io == &io_for_fd (BASIL_STDOUT_FD) && c == ' \n ' ) flush_output (io);
379381 }
380382
381383 bool isdigit (char c) {
You can’t perform that action at this time.
0 commit comments