From 786ff5cff8d6fdca6dd80bd0807619bdea5f0f51 Mon Sep 17 00:00:00 2001 From: "Gabriel A. Giovanini" Date: Fri, 19 Apr 2024 18:45:07 +0200 Subject: feat: Add spellfix check back for fts5 --- cmd/ui/ui.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'cmd') diff --git a/cmd/ui/ui.go b/cmd/ui/ui.go index 82c0bc5..b5f2f2f 100644 --- a/cmd/ui/ui.go +++ b/cmd/ui/ui.go @@ -21,13 +21,13 @@ var UICommand = &cli.Command{ Usage: "interactive dictionary", Flags: []cli.Flag{ &cli.StringFlag{ - Name: "filename", + Name: "database", Value: "main.dict", Usage: "Dictionary database location", }, }, Action: func(cCtx *cli.Context) error { - name := cCtx.String("lang") + name := cCtx.String("database") return Run(context.Background(), name) }, } @@ -87,8 +87,10 @@ func Run(ctx context.Context, name string) error { }) input.SetDoneFunc(func(key tcell.Key) { - textView.Clear() - input.SetText("") + if key == tcell.KeyEscape { + textView.Clear() + input.SetText("") + } }) grid := tview.NewGrid(). -- cgit v1.2.3