kitty shell: Fix pressing enter while cursor is not at end of line causes line to be truncated visually
This commit is contained in:
parent
a721ffeb7d
commit
b3f096b03b
@ -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
|
||||
}
|
||||
|
||||
@ -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])
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user