summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md2
-rw-r--r--lua/telescope/builtin/__internal.lua9
2 files changed, 9 insertions, 2 deletions
diff --git a/README.md b/README.md
index 6a57965..f99b7e1 100644
--- a/README.md
+++ b/README.md
@@ -301,7 +301,7 @@ Built-in functions. Ready to be bound to any key you like.
| `builtin.marks` | Lists vim marks and their value |
| `builtin.colorscheme` | Lists available colorschemes and applies them on `<cr>` |
| `builtin.quickfix` | Lists items in the quickfix list |
-| `builtin.quickfixhistory` | Lists all quickfix lists in your history and open them with `builtin.quickfix` |
+| `builtin.quickfixhistory` | Lists all quickfix lists in your history and open them with `builtin.quickfix` or quickfix window |
| `builtin.loclist` | Lists items from the current window's location list |
| `builtin.jumplist` | Lists Jump List entries |
| `builtin.vim_options` | Lists vim options, allows you to edit the current value on `<cr>` |
diff --git a/lua/telescope/builtin/__internal.lua b/lua/telescope/builtin/__internal.lua
index d0f32a3..7f85916 100644
--- a/lua/telescope/builtin/__internal.lua
+++ b/lua/telescope/builtin/__internal.lua
@@ -449,12 +449,19 @@ internal.quickfixhistory = function(opts)
end,
},
sorter = conf.generic_sorter(opts),
- attach_mappings = function(_, _)
+ attach_mappings = function(_, map)
action_set.select:replace(function(prompt_bufnr)
local nr = action_state.get_selected_entry().nr
actions.close(prompt_bufnr)
internal.quickfix { nr = nr }
end)
+
+ map({ "i", "n" }, "<C-q>", function(prompt_bufnr)
+ local nr = action_state.get_selected_entry().nr
+ actions.close(prompt_bufnr)
+ vim.cmd(nr .. "chistory")
+ vim.cmd "copen"
+ end)
return true
end,
})