Skip to content

Commit

Permalink
Added tokenizer to virtual table
Browse files Browse the repository at this point in the history
  • Loading branch information
grrlopes committed Aug 13, 2023
1 parent 600fc55 commit 4dfdbb9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions helper/keymaps.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ var HotKeys = Keymap{
key.WithHelp("enter", "select"),
),
Finder: key.NewBinding(
key.WithKeys("/"),
key.WithHelp("/", "finder"),
key.WithKeys("f"),
key.WithHelp("f", "finder"),
),
Back: key.NewBinding(
key.WithKeys("esc"),
Expand Down
3 changes: 2 additions & 1 deletion repositories/sqlite/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ CREATE VIRTUAL TABLE IF NOT EXISTS commands_fts USING fts5(
created_at,
deleted_at,
content='commands',
content_rowid='id'
content_rowid='id',
tokenize="unicode61 tokenchars '-'"
);
CREATE TRIGGER IF NOT EXISTS commands_insert AFTER INSERT ON commands
Expand Down
2 changes: 1 addition & 1 deletion ui/home.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ func (m ModelHome) Update(msg tea.Msg) (*ModelHome, tea.Cmd) {
m.home.Cursor = 0
case "enter":
return &m, tea.Quit
case "/":
case "f":
m.home.Finder.Focus()
m.home.Pagination.Page = 0
}
Expand Down

0 comments on commit 4dfdbb9

Please sign in to comment.