mirror of
https://github.com/rivo/tview.git
synced 2025-04-28 13:48:53 +08:00
Don't attempt to find the cursor if the TextArea width is unknown. Fixes #915
This commit is contained in:
parent
1b91b8131c
commit
05d01944a1
@ -1443,7 +1443,7 @@ func (t *TextArea) findCursor(clamp bool, startRow int) {
|
|||||||
t.cursor.column = t.cursor.actualColumn
|
t.cursor.column = t.cursor.actualColumn
|
||||||
}()
|
}()
|
||||||
|
|
||||||
if !clamp && t.cursor.row >= 0 {
|
if !clamp && t.cursor.row >= 0 || t.lastWidth <= 0 {
|
||||||
return // Nothing to do.
|
return // Nothing to do.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user