summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/cio.cc
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-07-07 15:28:06 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-07-07 15:28:06 +0000
commitc25973abd006dc9584efc3ce3538758b30cf3a2a (patch)
tree573598a46d696ef31a20a486e92d5868ec15ed13 /crawl-ref/source/cio.cc
parent17b7bb3e2bab6f05a2e3000b11896f3987ed5a80 (diff)
downloadcrawl-ref-c25973abd006dc9584efc3ce3538758b30cf3a2a.tar.gz
crawl-ref-c25973abd006dc9584efc3ce3538758b30cf3a2a.zip
Extend rectangular vault support for regular vaults.
Vault collision checking is also non-rectangular now. Fixed Windows builds not reporting line numbers in .des file error messages. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1784 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/cio.cc')
-rw-r--r--crawl-ref/source/cio.cc19
1 files changed, 19 insertions, 0 deletions
diff --git a/crawl-ref/source/cio.cc b/crawl-ref/source/cio.cc
index d22729a7fa..23305e556c 100644
--- a/crawl-ref/source/cio.cc
+++ b/crawl-ref/source/cio.cc
@@ -386,6 +386,21 @@ bool line_reader::is_wordchar(int c)
return isalnum(c) || c == '_' || c == '-';
}
+void line_reader::kill_to_begin()
+{
+ if (!pos || cur == buffer)
+ return;
+
+ buffer[length] = 0;
+ cursorto(0);
+ wrapcprintf(wrapcol, "%s%*s", cur, cur - buffer, "");
+ memmove(buffer, cur, length - pos);
+ length -= pos;
+ pos = 0;
+ cur = buffer;
+ cursorto(pos);
+}
+
void line_reader::killword()
{
if (!pos || cur == buffer)
@@ -483,6 +498,10 @@ int line_reader::process_key(int ch)
killword();
break;
+ case CONTROL('U'):
+ kill_to_begin();
+ break;
+
case CK_LEFT:
if (pos)
{