Finish port of themes kitten to Go

This commit is contained in:
Kovid Goyal
2023-03-14 20:24:21 +05:30
parent 0c20a4d980
commit 0805330b77
5 changed files with 116 additions and 53 deletions

View File

@@ -55,7 +55,9 @@ func (self *Readline) all_text() string {
func (self *Readline) set_text(text string) {
self.move_to_start()
self.erase_chars_after_cursor(123456789, true)
self.add_text(text)
if text != "" {
self.add_text(text)
}
self.move_to_end()
}