From 42b35070b303309b6eaea71360b8bbdbdf94d375 Mon Sep 17 00:00:00 2001 From: Robert Vollmert Date: Thu, 26 Nov 2009 11:38:20 +0100 Subject: Only scroll if window is actually full. --- crawl-ref/source/libunix.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'crawl-ref/source/libunix.cc') diff --git a/crawl-ref/source/libunix.cc b/crawl-ref/source/libunix.cc index 1da742ee28..f8c462edce 100644 --- a/crawl-ref/source/libunix.cc +++ b/crawl-ref/source/libunix.cc @@ -429,10 +429,10 @@ void message_out(int which_line, int color, const char *s, int firstcol, else firstcol--; - if (newline && which_line == crawl_view.msgsz.y - 1) + int x, y; + getyx(Message_Window, y, x); + if (newline && which_line == y && which_line == crawl_view.msgsz.y - 1) { - int x, y; - getyx(Message_Window, y, x); scroll(Message_Window); wmove(Message_Window, y - 1, x); } @@ -443,7 +443,6 @@ void message_out(int which_line, int color, const char *s, int firstcol, // Fix stdscr cursor to same place as Message_Window cursor. This // is necessary because when reading input we use stdscr. { - int x, y; getyx(Message_Window, y, x); move(y + crawl_view.msgp.y - 1, crawl_view.msgp.x - 1 + x); } -- cgit v1.2.3-54-g00ecf