aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/window.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/window.c b/apps/window.c
index 6309e51..208c4d4 100644
--- a/apps/window.c
+++ b/apps/window.c
@@ -45,6 +45,11 @@ int main()
if (!event->press)
break;
+ if (char_x * font_width >= (int)win.width) {
+ char_y++;
+ char_x = 0;
+ }
+
if (ch == '\n') {
char_x = 0;
char_y++;