diff options
author | Robert Vollmert <rvollmert@gmx.net> | 2009-11-26 11:38:20 +0100 |
---|---|---|
committer | Robert Vollmert <rvollmert@gmx.net> | 2009-11-26 11:56:05 +0100 |
commit | 42b35070b303309b6eaea71360b8bbdbdf94d375 (patch) | |
tree | f1ee78acdc817c60d1478504d5b545dcabb91a70 /crawl-ref/source/libunix.cc | |
parent | a4b3634349188f5d8af5a4b38c51aeb32c218638 (diff) | |
download | crawl-ref-42b35070b303309b6eaea71360b8bbdbdf94d375.tar.gz crawl-ref-42b35070b303309b6eaea71360b8bbdbdf94d375.zip |
Only scroll if window is actually full.
Diffstat (limited to 'crawl-ref/source/libunix.cc')
-rw-r--r-- | crawl-ref/source/libunix.cc | 7 |
1 files changed, 3 insertions, 4 deletions
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); } |