fix(entry_to_qf): handle nil entry.cwd and absolute filenames (#1058)
This commit is contained in:
@@ -367,6 +367,8 @@ builtin.find_files({opts}) *builtin.find_files()*
|
|||||||
flag for the `find` command)
|
flag for the `find` command)
|
||||||
{hidden} (boolean) determines whether to show hidden files or
|
{hidden} (boolean) determines whether to show hidden files or
|
||||||
not (default is false)
|
not (default is false)
|
||||||
|
{no_ignore} (boolean) show files ignored by .gitignore, .ignore,
|
||||||
|
etc. (default is false)
|
||||||
{search_dirs} (table) directory/directories to search in
|
{search_dirs} (table) directory/directories to search in
|
||||||
|
|
||||||
|
|
||||||
@@ -468,6 +470,9 @@ builtin.git_commits({opts}) *builtin.git_commits()*
|
|||||||
Lists commits for current directory with diff preview
|
Lists commits for current directory with diff preview
|
||||||
- Default keymaps:
|
- Default keymaps:
|
||||||
- `<cr>`: checks out the currently selected commit
|
- `<cr>`: checks out the currently selected commit
|
||||||
|
- `<C-r>m`: resets current branch to selected commit using mixed mode
|
||||||
|
- `<C-r>s`: resets current branch to selected commit using soft mode
|
||||||
|
- `<C-r>h`: resets current branch to selected commit using hard mode
|
||||||
|
|
||||||
|
|
||||||
Parameters: ~
|
Parameters: ~
|
||||||
@@ -1365,6 +1370,30 @@ actions.git_rebase_branch({prompt_bufnr}) *actions.git_rebase_branch()*
|
|||||||
{prompt_bufnr} (number) The prompt bufnr
|
{prompt_bufnr} (number) The prompt bufnr
|
||||||
|
|
||||||
|
|
||||||
|
actions.git_reset_mixed({prompt_bufnr}) *actions.git_reset_mixed()*
|
||||||
|
Reset to selected git commit using mixed mode
|
||||||
|
|
||||||
|
|
||||||
|
Parameters: ~
|
||||||
|
{prompt_bufnr} (number) The prompt bufnr
|
||||||
|
|
||||||
|
|
||||||
|
actions.git_reset_soft({prompt_bufnr}) *actions.git_reset_soft()*
|
||||||
|
Reset to selected git commit using soft mode
|
||||||
|
|
||||||
|
|
||||||
|
Parameters: ~
|
||||||
|
{prompt_bufnr} (number) The prompt bufnr
|
||||||
|
|
||||||
|
|
||||||
|
actions.git_reset_hard({prompt_bufnr}) *actions.git_reset_hard()*
|
||||||
|
Reset to selected git commit using hard mode
|
||||||
|
|
||||||
|
|
||||||
|
Parameters: ~
|
||||||
|
{prompt_bufnr} (number) The prompt bufnr
|
||||||
|
|
||||||
|
|
||||||
actions.git_staging_toggle({prompt_bufnr}) *actions.git_staging_toggle()*
|
actions.git_staging_toggle({prompt_bufnr}) *actions.git_staging_toggle()*
|
||||||
Stage/unstage selected file
|
Stage/unstage selected file
|
||||||
|
|
||||||
|
|||||||
@@ -17,11 +17,10 @@ local p_scroller = require "telescope.pickers.scroller"
|
|||||||
local action_state = require "telescope.actions.state"
|
local action_state = require "telescope.actions.state"
|
||||||
local action_utils = require "telescope.actions.utils"
|
local action_utils = require "telescope.actions.utils"
|
||||||
local action_set = require "telescope.actions.set"
|
local action_set = require "telescope.actions.set"
|
||||||
|
local from_entry = require "telescope.from_entry"
|
||||||
|
|
||||||
local transform_mod = require("telescope.actions.mt").transform_mod
|
local transform_mod = require("telescope.actions.mt").transform_mod
|
||||||
|
|
||||||
local Path = require "plenary.path"
|
|
||||||
|
|
||||||
local actions = setmetatable({}, {
|
local actions = setmetatable({}, {
|
||||||
__index = function(_, k)
|
__index = function(_, k)
|
||||||
-- TODO(conni2461): Remove deprecated messages
|
-- TODO(conni2461): Remove deprecated messages
|
||||||
@@ -585,7 +584,7 @@ end
|
|||||||
local entry_to_qf = function(entry)
|
local entry_to_qf = function(entry)
|
||||||
return {
|
return {
|
||||||
bufnr = entry.bufnr,
|
bufnr = entry.bufnr,
|
||||||
filename = Path:new(entry.cwd, entry.filename):absolute(),
|
filename = from_entry.path(entry, false),
|
||||||
lnum = entry.lnum,
|
lnum = entry.lnum,
|
||||||
col = entry.col,
|
col = entry.col,
|
||||||
text = entry.text or entry.value.text or entry.value,
|
text = entry.text or entry.value.text or entry.value,
|
||||||
|
|||||||
Reference in New Issue
Block a user