Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaq committed Oct 7, 2024
1 parent 57fa25c commit 4e88016
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/etk/etktest/etktest.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func Setup(t *testing.T, ev *eval.Evaler, f etk.Comp) {
}
for _, ev := range events {
sc.RefreshIfRequested()
reaction := sc.Handle(ev)
reaction := sc.React(ev)
if opts.ShowReaction {
fmt.Fprintln(fm.ByteOutput(), reaction)
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/etk/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func Run(tty cli.TTY, fm *eval.Frame, f Comp) (vals.Map, error) {

select {
case event := <-eventCh:
reaction := sc.Handle(event)
reaction := sc.React(event)
if reaction == Finish || reaction == FinishEOF {
h, w := tty.Size()
buf := sc.Render(w, h)
Expand Down Expand Up @@ -83,7 +83,7 @@ func (sc *StatefulComp) Render(width, height int) *term.Buffer {
return sc.view.Render(width, height)
}

func (sc *StatefulComp) Handle(event term.Event) Reaction {
func (sc *StatefulComp) React(event term.Event) Reaction {
reaction := sc.callReact(event)
sc.Refresh()
return reaction
Expand Down

0 comments on commit 4e88016

Please sign in to comment.