diff options
Diffstat (limited to 'src/ui/window.c')
-rw-r--r-- | src/ui/window.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/ui/window.c b/src/ui/window.c index 3ca9b927..c40e3547 100644 --- a/src/ui/window.c +++ b/src/ui/window.c @@ -1269,11 +1269,22 @@ void win_print_nowrap(WINDOW *win, char *msg, gboolean newline) { int maxx = getmaxx(win); + int curx = getcurx(win); int cury = getcury(win); - waddnstr(win, msg, maxx); + waddnstr(win, msg, maxx - curx); if (newline) { wmove(win, cury+1, 0); } } + +void +win_newline_lazy(WINDOW *win) +{ + int curx = getcurx(win); + if (curx > 0) { + int cury = getcury(win); + wmove(win, cury+1, 0); + } +} |