Skip to content

Commit

Permalink
Silly error in the edit widget led to losing cursor control
Browse files Browse the repository at this point in the history
The UserInput function for the edit widget was returning false even in
cases where it was handling the input. If e.g. edit was embedded in a
column widget with selectable widgets either side, a left/right cursor
press inside widget would move the widget's cursor, but also bubble up
to the column widget and cause it to change the focus widget from edit
to one of its neighbors.
  • Loading branch information
gcla committed Jun 3, 2022
1 parent 072f088 commit 4d04cba
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions widgets/edit/edit.go
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,7 @@ func UserInput(w IWidget, ev interface{}, size gowid.IRenderSize, focus gowid.Se
}

if !handled {
handled = true
switch ev.Key() {
case tcell.KeyPgUp:
handled = w.UpLines(size, true, app)
Expand Down

0 comments on commit 4d04cba

Please sign in to comment.