fix: revert buffers previewer (#1400)

* Reverts #1120 many issues arise (mru, highlighting, settings inheritance, ...) when previewing actual buffers
This commit is contained in:
fdschmidt93
2021-11-04 07:55:32 +01:00
committed by GitHub
parent 2097f11305
commit 97842abb03
5 changed files with 19 additions and 127 deletions

View File

@@ -779,18 +779,9 @@ internal.buffers = function(opts)
results = buffers,
entry_maker = opts.entry_maker or make_entry.gen_from_buffer(opts),
},
previewer = previewers.buffers.new(opts),
previewer = conf.grep_previewer(opts),
sorter = conf.generic_sorter(opts),
default_selection_index = default_selection_idx,
attach_mappings = function(_, _)
action_set.select:enhance {
post = function()
local selection = action_state.get_selected_entry()
vim.api.nvim_win_set_cursor(0, { selection.lnum, selection.col or 0 })
end,
}
return true
end,
}):find()
end