bounds checking for vttest

This commit is contained in:
Liam Galvin 2018-11-29 13:19:30 +00:00
parent 16e369ef1d
commit 083f3dd458
1 changed files with 3 additions and 1 deletions

View File

@ -216,7 +216,6 @@ func (buffer *Buffer) StartSelection(col uint16, viewRow uint16) {
if buffer.selectionComplete {
buffer.selectionEnd = nil
if buffer.selectionStart != nil && time.Since(buffer.selectionClickTime) < time.Millisecond*500 {
if buffer.selectionExpanded {
//select whole line!
@ -927,6 +926,9 @@ func (buffer *Buffer) EraseDisplayToCursor() {
line := buffer.getCurrentLine()
for i := 0; i < int(buffer.cursorX); i++ {
if i >= len(line.cells) {
break
}
line.cells[i].erase()
}
for i := uint16(0); i < buffer.cursorY; i++ {