From 14bb86e8dcde2168dffcda5d95b280d7a345804c Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Sun, 13 Dec 2015 03:48:20 -0800 Subject: [PATCH] The smarttab code wasn't used at ends of commands. --- Console.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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) { -- 2.49.0