Get completion basically working

This commit is contained in:
Kovid Goyal
2022-11-13 19:50:55 +05:30
parent 9e2c96653f
commit 723a9c91b5
6 changed files with 240 additions and 40 deletions

View File

@@ -117,9 +117,9 @@ type Readline struct {
input_state InputState
// The number of lines after the initial line on the screen
cursor_y int
screen_width int
last_yank_extent struct {
cursor_y int
screen_width, screen_height int
last_yank_extent struct {
start, end Position
}
bracketed_paste_buffer strings.Builder
@@ -259,10 +259,7 @@ func (self *Readline) CursorAtEndOfLine() bool {
}
func (self *Readline) OnResize(old_size loop.ScreenSize, new_size loop.ScreenSize) error {
self.screen_width = int(new_size.CellWidth)
if self.screen_width < 1 {
self.screen_width = 1
}
self.screen_width, self.screen_height = 0, 0
self.Redraw()
return nil
}