diff options
author | Robert Vollmert <rvollmert@gmx.net> | 2010-01-18 15:09:09 +0100 |
---|---|---|
committer | Robert Vollmert <rvollmert@gmx.net> | 2010-01-18 15:09:14 +0100 |
commit | cff89ad3eefb7d88ddf3402012cdeed7667d842c (patch) | |
tree | 3d3e3d89f2cdddfedc3179dba6e7d62523968434 /crawl-ref/source/luaterp.cc | |
parent | 1a45c20c828d1861ca6f04bf956e002fb25dccd9 (diff) | |
download | crawl-ref-cff89ad3eefb7d88ddf3402012cdeed7667d842c.tar.gz crawl-ref-cff89ad3eefb7d88ddf3402012cdeed7667d842c.zip |
Convert luaterp to use msgwin_get_line.
This fixes the scrolling removing old input.
Diffstat (limited to 'crawl-ref/source/luaterp.cc')
-rw-r--r-- | crawl-ref/source/luaterp.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/crawl-ref/source/luaterp.cc b/crawl-ref/source/luaterp.cc index 8df7599967..a775057330 100644 --- a/crawl-ref/source/luaterp.cc +++ b/crawl-ref/source/luaterp.cc @@ -19,6 +19,7 @@ #include "cio.h" #include "clua.h" #include "dlua.h" +#include "message.h" #include "options.h" #ifdef WIZARD @@ -44,8 +45,8 @@ static int _pushline(lua_State *ls, int firstline) char buffer[80]; char *b = buffer; size_t l; - mpr(firstline ? "> " : ". ", MSGCH_PROMPT); - if (cancelable_get_line_autohist(buffer, sizeof(buffer))) + std::string prompt = firstline ? "> " : ". "; + if (msgwin_get_line_autohist(prompt, buffer, sizeof(buffer))) return (0); l = strlen(b); |