Skip to content

Commit

Permalink
fix: use TabNewEntered intead of TabNew (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
tiagovla committed Jun 27, 2022
1 parent 8a064b3 commit 2db6d31
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lua/scope/core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ local M = {}
M.cache = {}
M.last_tab = 0

function M.on_tab_new()
function M.on_tab_new_entered()
vim.api.nvim_buf_set_option(0, "buflisted", true)
end

Expand Down
4 changes: 2 additions & 2 deletions lua/scope/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function M._setup_legacy()
autocmd TabEnter * lua require("scope.core").on_tab_enter()
autocmd TabLeave * lua require("scope.core").on_tab_leave()
autocmd TabClosed * lua require("scope.core").on_tab_closed()
autocmd TabNew * lua require("scope.core").on_tab_new()
autocmd TabNewEntered * lua require("scope.core").on_tab_new_entered()
augroup END
]]
end
Expand All @@ -21,7 +21,7 @@ function M._setup()
api.nvim_create_autocmd("TabEnter", { group = group, callback = core.on_tab_enter })
api.nvim_create_autocmd("TabLeave", { group = group, callback = core.on_tab_leave })
api.nvim_create_autocmd("TabClosed", { group = group, callback = core.on_tab_closed })
api.nvim_create_autocmd("TabNew", { group = group, callback = core.on_tab_new })
api.nvim_create_autocmd("TabNewEntered", { group = group, callback = core.on_tab_new_entered })
api.nvim_create_user_command("ScopeList", core.print_summary, {}) --TODO: improve this
end

Expand Down

0 comments on commit 2db6d31

Please sign in to comment.