Skip to content

Commit d924108

Browse files
committed
chore: complete lua doc
1 parent 46c6b42 commit d924108

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

lua/nvim-tree/actions/node/open-file.lua

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -369,29 +369,26 @@ end
369369

370370
---@param mode string
371371
---@param filename string
372+
---@return nil
372373
function M.fn(mode, filename)
373374
if type(mode) ~= "string" then
374375
mode = ""
375376
end
376377

377378
if mode == "tabnew" then
378-
open_file_in_tab(filename)
379-
return
379+
return open_file_in_tab(filename)
380380
end
381381

382382
if mode == "drop" then
383-
drop(filename)
384-
return
383+
return drop(filename)
385384
end
386385

387386
if mode == "tab_drop" then
388-
tab_drop(filename)
389-
return
387+
return tab_drop(filename)
390388
end
391389

392390
if mode == "edit_in_place" then
393-
edit_in_current_buf(filename)
394-
return
391+
return edit_in_current_buf(filename)
395392
end
396393

397394
local buf_loaded = is_already_loaded(filename)
@@ -413,8 +410,7 @@ function M.fn(mode, filename)
413410
end
414411

415412
if mode == "preview" or mode == "preview_no_picker" then
416-
on_preview(buf_loaded)
417-
return
413+
return on_preview(buf_loaded)
418414
end
419415

420416
if M.quit_on_open then

0 commit comments

Comments
 (0)