Implement clear screen c-l binding

This commit is contained in:
Kovid Goyal
2022-10-25 09:40:12 +05:30
parent 19bf07abd9
commit b7816d26be
4 changed files with 13 additions and 1 deletions

View File

@@ -252,6 +252,10 @@ func (self *Loop) AllowLineWrapping(allow bool) {
}
}
func (self *Loop) ClearScreen() {
self.QueueWriteString("\x1b[H\x1b[2J")
}
func (self *Loop) Quit(exit_code int) {
self.exit_code = exit_code
self.keep_going = false