aboutsummaryrefslogtreecommitdiff
path: root/cmd/ui
diff options
context:
space:
mode:
authorGabriel A. Giovanini <mail@gabrielgio.me>2024-04-19 18:45:07 +0200
committerGabriel A. Giovanini <mail@gabrielgio.me>2024-04-19 18:45:07 +0200
commit786ff5cff8d6fdca6dd80bd0807619bdea5f0f51 (patch)
treefa3945280c5f357412fbb964d8e5fc8068aed555 /cmd/ui
parent57c782546739fde08138b00e2d0b3ba5f18fb676 (diff)
downloaddict-786ff5cff8d6fdca6dd80bd0807619bdea5f0f51.tar.gz
dict-786ff5cff8d6fdca6dd80bd0807619bdea5f0f51.tar.bz2
dict-786ff5cff8d6fdca6dd80bd0807619bdea5f0f51.zip
feat: Add spellfix check back for fts5
Diffstat (limited to 'cmd/ui')
-rw-r--r--cmd/ui/ui.go10
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().