diff options
author | Gabriel A. Giovanini <mail@gabrielgio.me> | 2024-04-19 18:45:07 +0200 |
---|---|---|
committer | Gabriel A. Giovanini <mail@gabrielgio.me> | 2024-04-19 18:45:07 +0200 |
commit | 786ff5cff8d6fdca6dd80bd0807619bdea5f0f51 (patch) | |
tree | fa3945280c5f357412fbb964d8e5fc8068aed555 /cmd | |
parent | 57c782546739fde08138b00e2d0b3ba5f18fb676 (diff) | |
download | dict-786ff5cff8d6fdca6dd80bd0807619bdea5f0f51.tar.gz dict-786ff5cff8d6fdca6dd80bd0807619bdea5f0f51.tar.bz2 dict-786ff5cff8d6fdca6dd80bd0807619bdea5f0f51.zip |
feat: Add spellfix check back for fts5
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/ui/ui.go | 10 |
1 files changed, 6 insertions, 4 deletions
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(). |