Implements horizontal scrolling in previewer & results. (#2437)
* Implements horizontal scrolling in previewer & results. * docs: update wrt. horizontal scrolling in previewer & results
This commit is contained in:
committed by
GitHub
parent
ffe35cb433
commit
5fff2a138b
@@ -26,6 +26,7 @@ function Previewer:new(opts)
|
||||
_teardown_func = opts.teardown,
|
||||
_send_input = opts.send_input,
|
||||
_scroll_fn = opts.scroll_fn,
|
||||
_scroll_horizontal_fn = opts.scroll_horizontal_fn,
|
||||
preview_fn = opts.preview_fn,
|
||||
_empty_bufnr = nil,
|
||||
}, Previewer)
|
||||
@@ -95,4 +96,12 @@ function Previewer:scroll_fn(direction)
|
||||
end
|
||||
end
|
||||
|
||||
function Previewer:scroll_horizontal_fn(direction)
|
||||
if self._scroll_horizontal_fn then
|
||||
self:_scroll_horizontal_fn(direction)
|
||||
else
|
||||
vim.api.nvim_err_writeln "scroll_horizontal_fn is not defined for this previewer"
|
||||
end
|
||||
end
|
||||
|
||||
return Previewer
|
||||
|
||||
Reference in New Issue
Block a user