diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ef42830..641ab144 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,7 +19,8 @@ All notable changes to this project will be documented in this file. - Add `assert` - Add `when-with` - Add `if-with` -- Add completion to the default repl based on currently defined bindings. +- Add completion to the default repl based on currently defined bindings. Also generally improve + the repl keybindings. - Add `eachk` - Add `eachp` - Improve functionality of the `next` function. `next` now works on many different diff --git a/src/mainclient/line.c b/src/mainclient/line.c index 9a7449f3..9fd41666 100644 --- a/src/mainclient/line.c +++ b/src/mainclient/line.c @@ -280,10 +280,8 @@ static void historymove(int delta) { gbl_historyi += delta; if (gbl_historyi < 0) { gbl_historyi = 0; - return; } else if (gbl_historyi >= gbl_history_count) { gbl_historyi = gbl_history_count - 1; - return; } strncpy(gbl_buf, gbl_history[gbl_historyi], JANET_LINE_MAX - 1); gbl_pos = gbl_len = strlen(gbl_buf); @@ -720,6 +718,12 @@ static int line() { case 'f': krightw(); break; + case ',': + historymove(JANET_HISTORY_MAX); + break; + case '.': + historymove(-JANET_HISTORY_MAX); + break; } } break;