Skip to content

Commit a9e9ae3

Browse files
Merge pull request #101 from pieces-app/fix-searching-
fix searching
2 parents cb6cfc5 + e41dcfe commit a9e9ae3

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

lua/pieces/assets/ui.lua

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ local function on_input(input)
6464
for i, result in ipairs(snippets_search_results) do
6565
local start_idx, end_idx = result.name:lower():find(input:lower())
6666
if start_idx and end_idx then
67-
vim.api.nvim_buf_add_highlight(results_popup.bufnr, -1, 'Search', i - 1, start_idx - 1,
68-
end_idx)
67+
vim.api.nvim_buf_add_highlight(results_popup.bufnr, -1, 'Search', i - 1, start_idx + 3,
68+
end_idx + 4)
6969
end
7070
end
7171
end
@@ -158,6 +158,8 @@ function M.setup()
158158
updater.results_popup = results_popup -- Update the new result popup
159159
layout:mount()
160160
vim.api.nvim_set_current_win(results_popup.winid)
161+
snippets_search_results = snippets.snippets
162+
updater.items = snippets_search_results
161163
updater:setup()
162164
end
163165

rplugin/python3/pieces_python/startup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ def on_startup(cls, ws):
6060
Settings.update_settings(version=__version__)
6161
if Settings.load_settings().get("version") != __version__:
6262
Settings.nvim.async_call(Settings.nvim.command, 'call PiecesRunRemotePlugins()')
63+
Settings.update_settings(version = __version__)
6364

6465
Settings.api_client.model_name = Settings.load_settings().get("model_name","GPT-4o Chat Model")
6566
BaseWebsocket.start_all()

0 commit comments

Comments
 (0)