feat: add scrolling in preview window (#47)

* feat: add scrolling in preview window

refactor into two layers

* remove redundant code

* add error message for scroll_fn and send_input

* consider count for preview scrolling
This commit is contained in:
haorenW1025
2020-09-17 00:20:45 +08:00
committed by GitHub
parent 9bdf5b3d4a
commit 7d1a8292b6
4 changed files with 52 additions and 1 deletions

View File

@@ -42,6 +42,9 @@ local default_mappings = {
["<C-x>"] = actions.goto_file_selection_split,
["<C-v>"] = actions.goto_file_selection_vsplit,
["<C-t>"] = actions.goto_file_selection_tabedit,
["<C-u>"] = actions.preview_scrolling_up,
["<C-d>"] = actions.preview_scrolling_down,
},
n = {
@@ -57,6 +60,9 @@ local default_mappings = {
["<Down>"] = actions.move_selection_next,
["<Up>"] = actions.move_selection_previous,
["<C-u>"] = actions.preview_scrolling_up,
["<C-d>"] = actions.preview_scrolling_down,
},
}