File tree Expand file tree Collapse file tree 1 file changed +12
-9
lines changed
Expand file tree Collapse file tree 1 file changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -146,17 +146,20 @@ function M.open(section_name, item_name)
146146
147147 local config = dv_config .get_config ()
148148
149- local view_maps = {
150- [" q" ] = cb (" close" ),
151- [" <esc>" ] = cb (" close" ),
152- }
153- local file_panel_maps = {
154- [" q" ] = cb (" close" ),
155- [" <esc>" ] = cb (" close" ),
149+ local keymaps = {
150+ view = {
151+ [" q" ] = cb (" close" ),
152+ [" <esc>" ] = cb (" close" ),
153+ },
154+ file_panel = {
155+ [" q" ] = cb (" close" ),
156+ [" <esc>" ] = cb (" close" ),
157+ },
156158 }
157159
158- config .keymaps .view = dv_config .extend_keymaps (view_maps , config .keymaps .view or {})
159- config .keymaps .file_panel = dv_config .extend_keymaps (file_panel_maps , config .keymaps .file_panel or {})
160+ for key , keymap in pairs (keymaps ) do
161+ config .keymaps [key ] = dv_config .extend_keymaps (keymap , config .keymaps [key ] or {})
162+ end
160163
161164 dv .setup (config )
162165
You can’t perform that action at this time.
0 commit comments