]> git.saurik.com Git - cycript.git/commitdiff
The smarttab code wasn't used at ends of commands.
authorJay Freeman (saurik) <saurik@saurik.com>
Sun, 13 Dec 2015 11:48:20 +0000 (03:48 -0800)
committerJay Freeman (saurik) <saurik@saurik.com>
Sun, 13 Dec 2015 11:48:20 +0000 (03:48 -0800)
Console.cpp

index 4cf0ac16158e9a40b8ceb37a7fff5e33217ff0fc..76ad5532b259f33e27e8e16a19d6a7c272856fb6 100644 (file)
@@ -394,6 +394,7 @@ static int CYConsoleKeyReturn(int count, int key) {
         if (memchr(rl_line_buffer, '\n', rl_end) == NULL)
             return rl_newline(count, key);
 
+      insert:
         char *before(CYmemrchr(rl_line_buffer, '\n', rl_point));
         if (before == NULL)
             before = rl_line_buffer;
@@ -440,8 +441,8 @@ static int CYConsoleKeyReturn(int count, int key) {
     if (done)
         return rl_newline(count, key);
 
-    rl_insert(count, '\n');
-    return 0;
+    // XXX: this was the most obvious fix, but is seriously dumb
+    goto insert;
 }
 
 static int CYConsoleKeyUp(int count, int key) {