Skip to content

Commit bbe36e7

Browse files
author
Sebastian Flügge
committed
fix: toggle current file headlines in all actions
Allow to filter headlines for current file only in all actions.
1 parent 366f68d commit bbe36e7

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

lua/telescope-orgmode/config.lua

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ function M.init_opts(opts, prompt_titles, default_state)
2323
end
2424
table.insert(opts.states, state)
2525
end
26+
27+
-- Capture the current buffer before opening telescope
28+
opts.original_buffer = vim.api.nvim_get_current_buf()
29+
opts.original_file = vim.api.nvim_buf_get_name(opts.original_buffer)
30+
2631
return opts
2732
end
2833

lua/telescope-orgmode/picker/search_headings.lua

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@ return function(opts)
1111
orgfiles = 'Search org files',
1212
}, 'headlines')
1313

14-
-- Capture the current buffer before opening telescope
15-
opts.original_buffer = vim.api.nvim_get_current_buf()
16-
opts.original_file = vim.api.nvim_buf_get_name(opts.original_buffer)
17-
1814
pickers
1915
.new(opts, {
2016
prompt_title = opts.prompt_titles[opts.state.current],

0 commit comments

Comments
 (0)