summaryrefslogtreecommitdiff
path: root/buffer.cpp
diff options
context:
space:
mode:
authortomsmeding <tom.smeding@gmail.com>2017-01-12 22:10:20 +0100
committertomsmeding <tom.smeding@gmail.com>2017-01-12 22:10:20 +0100
commit66e0b88d27966adae568f4f2ddbf2ff10bb812d9 (patch)
tree106ff2d11f0f01fa6f69f3f3e1b25be02f6b13f5 /buffer.cpp
parent790a796de93c6f9868ce78f4aea9262461e2b8c9 (diff)
Proper tab closing
Diffstat (limited to 'buffer.cpp')
-rw-r--r--buffer.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/buffer.cpp b/buffer.cpp
index b185b99..6fa7420 100644
--- a/buffer.cpp
+++ b/buffer.cpp
@@ -189,6 +189,8 @@ void Buffer::handleCommand(const Command &cmd){
} else {
cursor.x=screen[sp.y].cells[sp.x].linex;
}
+ } else if(cmd[0]=="cancel"){
+ bel(); //nothing to cancel, apparently
} else {
THROW("Unknown command: "+cmd[0]);
}
@@ -401,7 +403,7 @@ Buffer::Screenpos Buffer::findCursorInScreen() const {
}
}
-i64 numberWidth(i64 number){
+static i64 numberWidth(i64 number){
if(number<0)return 1+numberWidth(-number);
if(number==0)return 1;
return (i64)log10(number)+1;