From: Jay Freeman (saurik) Date: Sun, 13 Dec 2015 11:48:20 +0000 (-0800) Subject: The smarttab code wasn't used at ends of commands. X-Git-Tag: v0.9.590~218 X-Git-Url: https://git.saurik.com/cycript.git/commitdiff_plain/14bb86e8dcde2168dffcda5d95b280d7a345804c?ds=sidebyside The smarttab code wasn't used at ends of commands. --- diff --git a/Console.cpp b/Console.cpp index 4cf0ac1..76ad553 100644 --- a/Console.cpp +++ b/Console.cpp @@ -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) {