File tree 2 files changed +22
-2
lines changed
2 files changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -527,6 +527,12 @@ preview *actions.previe
527
527
Open the entry under the cursor in a preview window, or close the preview
528
528
window if already open
529
529
530
+ Parameters:
531
+ {horizontal} `boolean ` Open the buffer in a horizontal split
532
+ {split} `" aboveleft" |" belowright" |" topleft" |" botright" ` Split
533
+ modifier
534
+ {vertical} `boolean ` Open the buffer in a vertical split
535
+
530
536
preview_scroll_down *actions.preview_scroll_down*
531
537
Scroll down in the preview window
532
538
Original file line number Diff line number Diff line change @@ -69,7 +69,21 @@ M.select_tab = {
69
69
70
70
M .preview = {
71
71
desc = " Open the entry under the cursor in a preview window, or close the preview window if already open" ,
72
- callback = function ()
72
+ parameters = {
73
+ vertical = {
74
+ type = " boolean" ,
75
+ desc = " Open the buffer in a vertical split" ,
76
+ },
77
+ horizontal = {
78
+ type = " boolean" ,
79
+ desc = " Open the buffer in a horizontal split" ,
80
+ },
81
+ split = {
82
+ type = ' "aboveleft"|"belowright"|"topleft"|"botright"' ,
83
+ desc = " Split modifier" ,
84
+ },
85
+ },
86
+ callback = function (opts )
73
87
local entry = oil .get_cursor_entry ()
74
88
if not entry then
75
89
vim .notify (" Could not find entry under cursor" , vim .log .levels .ERROR )
@@ -88,7 +102,7 @@ M.preview = {
88
102
return
89
103
end
90
104
end
91
- oil .open_preview ()
105
+ oil .open_preview (opts )
92
106
end ,
93
107
}
94
108
You can’t perform that action at this time.
0 commit comments