summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/libunix.cc
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-01-12 12:38:22 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-01-12 12:38:22 +0000
commit632b1309b0fe1442f45fd783884b8dc1c7902f58 (patch)
tree9b1923b565c6a80656c76aec021b825ae6f80014 /crawl-ref/source/libunix.cc
parentf36c1880d545d8ce809306ef2bb945e1bb15c591 (diff)
downloadcrawl-ref-632b1309b0fe1442f45fd783884b8dc1c7902f58.tar.gz
crawl-ref-632b1309b0fe1442f45fd783884b8dc1c7902f58.zip
Handle the cursor correctly when scrolling the message window with curses.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@842 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/libunix.cc')
-rw-r--r--crawl-ref/source/libunix.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/crawl-ref/source/libunix.cc b/crawl-ref/source/libunix.cc
index 55273b343f..00cbed4302 100644
--- a/crawl-ref/source/libunix.cc
+++ b/crawl-ref/source/libunix.cc
@@ -270,7 +270,12 @@ void message_out(int which_line, int color, const char *s, int firstcol,
mvwaddstr(Message_Window, which_line, firstcol, s);
if (newline && which_line == get_message_window_height() - 1)
+ {
+ int x, y;
+ getyx(Message_Window, y, x);
scroll(Message_Window);
+ wmove(Message_Window, y - 1, x);
+ }
wrefresh(Message_Window);
}