diff options
author | 2022-02-23 10:51:58 -0500 | |
---|---|---|
committer | 2022-02-23 10:51:58 -0500 | |
commit | 6dc247b44324846f5645152d5a01edcf11702aee (patch) | |
tree | 6aa9b08a572896367b2dc6cd08b7b7a5d65d1bd1 /core | |
parent | e2f595093ba1a4c67935ad90d5974aa6f23a64cd (diff) |
Fixed bug in `ui.goto_file()` when specifying preferred view.
Diffstat (limited to 'core')
-rw-r--r-- | core/ui.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/ui.lua b/core/ui.lua index 286f03b5..8a57a160 100644 --- a/core/ui.lua +++ b/core/ui.lua @@ -272,7 +272,7 @@ function ui.goto_file(filename, split, preferred_view, sloppy) if #_VIEWS == 1 and split and not (view.buffer.filename or ''):find(patt) then view:split() else - local other_view = _VIEWS[preferred_view] + local other_view = preferred_view for _, view in ipairs(_VIEWS) do local view_filename = view.buffer.filename or '' if view_filename:find(patt) then |