summary refs log tree commit diff homepage
diff options
context:
space:
mode:
authorJune McEnroe <programble@gmail.com>2017-07-31 20:15:42 -0400
committerJune McEnroe <programble@gmail.com>2017-07-31 20:15:42 -0400
commit488513a14c5e5a378896d7cf4c2daa0803643367 (patch)
tree62ce61ce812373ef3f7ae008d8fced3cc4f5389d
parentTrack tile access counts (diff)
downloadtorus-488513a14c5e5a378896d7cf4c2daa0803643367.tar.gz
torus-488513a14c5e5a378896d7cf4c2daa0803643367.zip
Perform enter as two moves rather than a loop
-rwxr-xr-xclient.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/client.c b/client.c
index 72c21c9..4eb726b 100755
--- a/client.c
+++ b/client.c
@@ -130,9 +130,7 @@ static void readInput(void) {
             insert.len--;
         } else if (c == '\n') {
             clientMove(insert.dy, insert.dx);
-            for (uint8_t i = 0; i < insert.len; ++i) {
-                clientMove(-insert.dx, -insert.dy);
-            }
+            clientMove(-insert.dx * insert.len, -insert.dy * insert.len);
             insert.len = 0;
         } else if (isprint(c)) {
             clientPut(inputColor, c);