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
This is reproduced from the gowid commit ID
4d04cba8013a7ba78840387f8a45f2ebe05c7809

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.

In the context of termshark, this meant the various filter widgets were
losing focus when the user moved the cursor around the user-entered
text.
  • Loading branch information
gcla committed Jun 3, 2022
1 parent 1ef877d commit a1fd08c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require (
github.com/blang/semver v3.5.1+incompatible
github.com/fsnotify/fsnotify v1.4.9 // indirect
github.com/gcla/deep v1.0.2
github.com/gcla/gowid v1.3.1-0.20220530181752-072f0882aae0
github.com/gcla/gowid v1.3.1-0.20220603022106-4d04cba8013a
github.com/gcla/tail v1.0.1-0.20190505190527-650e90873359
github.com/gcla/term v0.0.0-20220601234708-3e6af2ebff27
github.com/gdamore/tcell/v2 v2.5.0
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ github.com/gcla/deep v1.0.2 h1:qBOx6eepcOSRYnHJ+f2ih4hP4Vca1YnLtXxp73n5KWI=
github.com/gcla/deep v1.0.2/go.mod h1:evE9pbpSGhItmFoBIk8hPOIC/keKTGYhFl6Le1Av+GE=
github.com/gcla/gowid v1.3.1-0.20220530181752-072f0882aae0 h1:myaHMntGEyzp1nWI8QL6596lwKKxclaPOS9D1XlvOGI=
github.com/gcla/gowid v1.3.1-0.20220530181752-072f0882aae0/go.mod h1:7T4Xzfznq31XvQyAOX+SZzQjvF7RX16mjXDXGB7R/44=
github.com/gcla/gowid v1.3.1-0.20220603022106-4d04cba8013a h1:8kh1ORv/P5ruPPoZBMrXAxw406+o9Uvg4fPblsMfcUo=
github.com/gcla/gowid v1.3.1-0.20220603022106-4d04cba8013a/go.mod h1:7T4Xzfznq31XvQyAOX+SZzQjvF7RX16mjXDXGB7R/44=
github.com/gcla/tail v1.0.1-0.20190505190527-650e90873359 h1:3xEhacR7pIJV8daurdBygptxhzTJeYFqJp1V6SDl+pE=
github.com/gcla/tail v1.0.1-0.20190505190527-650e90873359/go.mod h1:Wn+pZpM98JHSOYkPDtmdvlqmc0OzQGHWOsHB2d28WtQ=
github.com/gcla/term v0.0.0-20220601234708-3e6af2ebff27 h1:OmzD2vZl1UeSblMmUo4mKjnrtsn+VLxhkkqnDOPHrXY=
Expand Down

0 comments on commit a1fd08c

Please sign in to comment.