Skip to content

Commit 2af6a97

Browse files
committed
fix: go to file functionality
1 parent e122af3 commit 2af6a97

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

lua/octo/autocmds.lua

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,18 @@ function M.setup()
1818
end,
1919
})
2020

21-
define({ "BufEnter" }, {
22-
group = "octo_autocmds",
23-
pattern = { "*" },
24-
callback = function()
25-
local current_buffer = vim.api.nvim_buf_get_name(0)
26-
if not current_buffer:match "^octo://" then
27-
require("octo").update_layout_for_current_file()
28-
end
29-
end,
30-
})
21+
if config.values.use_local_fs then
22+
define({ "BufEnter" }, {
23+
group = "octo_autocmds",
24+
pattern = { "*" },
25+
callback = function()
26+
local current_buffer = vim.api.nvim_buf_get_name(0)
27+
if not current_buffer:match "^octo://" then
28+
require("octo").update_layout_for_current_file()
29+
end
30+
end,
31+
})
32+
end
3133

3234
define({ "BufReadCmd" }, {
3335
group = "octo_autocmds",

0 commit comments

Comments
 (0)