Skip to content

Commit 7850378

Browse files
committed
Fix issue with messed up linewrap in qemu-system-x86_64
Apparently the qemu-system-x86_64 in -nographics mode does all sorts of crazy things to the terminal. Most annoying, it disables linewrap. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
1 parent 438d6b4 commit 7850378

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/helpers.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ char *console(void)
8484

8585
void console_init(void)
8686
{
87+
/* Enable line wrap, if disabled previously, e.g., qemu */
88+
dprint(STDOUT_FILENO, "\033[?7h", 5);
89+
8790
log_init();
8891
}
8992

src/stty.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ void stty(int fd, speed_t speed)
132132
dprint(fd, "\033[?25h", 6);
133133

134134
/* Enable line wrap, if disabled previously */
135-
dprint(fd, "\033[7h", 4);
135+
dprint(fd, "\033[?7h", 5);
136136
}
137137

138138
/**

0 commit comments

Comments
 (0)