Skip to content

Commit be83805

Browse files
committed
fix(reference_picker): clean up display formatting
- Remove dead code referencing non-existent ref.context field - Only show line number in display when present (avoid 'path:?')
1 parent ee47b2b commit be83805

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lua/opencode/ui/reference_picker.lua

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -283,12 +283,10 @@ end
283283
---@return PickerItem
284284
local function format_reference_item(ref, width)
285285
local icon = icons.get('file')
286-
local location = ref.file_path .. ':' .. (ref.line or '?')
286+
local location = ref.line and (ref.file_path .. ':' .. ref.line) or ref.file_path
287287
local display_text = icon .. ' ' .. location
288288

289-
-- Create picker item with context as secondary info
290-
-- We'll use the debug_text field to show the context
291-
return base_picker.create_picker_item(display_text, nil, ref.context, width)
289+
return base_picker.create_picker_item(display_text, nil, nil, width)
292290
end
293291

294292
---Open the reference picker

0 commit comments

Comments
 (0)