More tests

This commit is contained in:
Kovid Goyal
2022-10-16 22:05:24 +05:30
parent 3c4a411cad
commit 5509673ff3
3 changed files with 55 additions and 5 deletions

View File

@@ -105,13 +105,17 @@ func (self *Readline) AddHistoryItem(hi HistoryItem) {
self.history.add_item(hi)
}
func (self *Readline) ChangeLoopAndResetText(lp *loop.Loop) {
self.loop = lp
func (self *Readline) ResetText() {
self.lines = []string{""}
self.cursor = Position{}
self.cursor_y = 0
}
func (self *Readline) ChangeLoopAndResetText(lp *loop.Loop) {
self.loop = lp
self.ResetText()
}
func (self *Readline) Start() {
self.loop.SetCursorShape(loop.BAR_CURSOR, true)
self.loop.StartBracketedPaste()