feat: add horizontal scrolling actions (#709)
* feat: add horizontal scrolling actions * refactor(actions): remove unnecessary use of `nvim_replace_termcodes` * lint: apply stylua --------- Co-authored-by: Steven Arcangeli <506791+stevearc@users.noreply.github.com>
This commit is contained in:
parent
81b8a91735
commit
24055701b7
2 changed files with 30 additions and 0 deletions
|
|
@ -596,6 +596,12 @@ preview_scroll_down *actions.preview_scroll_dow
|
|||
preview_scroll_up *actions.preview_scroll_up*
|
||||
Scroll up in the preview window
|
||||
|
||||
preview_scroll_left *actions.preview_scroll_left*
|
||||
Scroll left in the preview window
|
||||
|
||||
preview_scroll_right *actions.preview_scroll_right*
|
||||
Scroll right in the preview window
|
||||
|
||||
refresh *actions.refresh*
|
||||
Refresh current directory list
|
||||
|
||||
|
|
|
|||
|
|
@ -136,6 +136,30 @@ M.preview_scroll_up = {
|
|||
end,
|
||||
}
|
||||
|
||||
M.preview_scroll_left = {
|
||||
desc = "Scroll left in the preview window",
|
||||
callback = function()
|
||||
local winid = util.get_preview_win()
|
||||
if winid then
|
||||
vim.api.nvim_win_call(winid, function()
|
||||
vim.cmd.normal({ "zH", bang = true })
|
||||
end)
|
||||
end
|
||||
end,
|
||||
}
|
||||
|
||||
M.preview_scroll_right = {
|
||||
desc = "Scroll right in the preview window",
|
||||
callback = function()
|
||||
local winid = util.get_preview_win()
|
||||
if winid then
|
||||
vim.api.nvim_win_call(winid, function()
|
||||
vim.cmd.normal({ "zL", bang = true })
|
||||
end)
|
||||
end
|
||||
end,
|
||||
}
|
||||
|
||||
M.parent = {
|
||||
desc = "Navigate to the parent path",
|
||||
callback = oil.open,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue