diff --git a/tools/cmd/at/shell.go b/tools/cmd/at/shell.go index a84dda172..350fdc9c6 100644 --- a/tools/cmd/at/shell.go +++ b/tools/cmd/at/shell.go @@ -61,6 +61,8 @@ func shell_loop(rl *readline.Readline, kill_if_signaled bool) (int, error) { rl.Redraw() return nil } + rl.MoveCursorToEnd() + rl.Redraw() lp.ClearToEndOfScreen() return ErrExec } diff --git a/tools/tui/readline/api.go b/tools/tui/readline/api.go index 90f947929..f408f9bc2 100644 --- a/tools/tui/readline/api.go +++ b/tools/tui/readline/api.go @@ -254,6 +254,10 @@ func (self *Readline) AllText() string { return self.all_text() } +func (self *Readline) MoveCursorToEnd() bool { + return self.move_to_end() +} + func (self *Readline) CursorAtEndOfLine() bool { return self.input_state.cursor.X >= len(self.input_state.lines[self.input_state.cursor.Y]) }