Skip to content

Commit

Permalink
refactor(upstream-api): use $NVIM instead of argc to detect nested
Browse files Browse the repository at this point in the history
nvim instance(s) (Close #19)
  • Loading branch information
nyngwang committed Mar 12, 2023
1 parent 17a8843 commit bd6905c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lua/neo-term/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function M.neo_term_toggle()

-- Case2: might open.

if vim.fn.argc() > 0 then return end
if os.getenv('NVIM') then return end
for _, v in pairs(M.exclude_filetypes) do if vim.bo.filetype == v then return end end
for _, v in pairs(M.exclude_buftypes) do if vim.bo.buftype == v then return end end

Expand Down Expand Up @@ -117,7 +117,7 @@ function M.neo_term_hijack_toggle()

-- Case2: might open.

if vim.fn.argc() > 0 then return end
if os.getenv('NVIM') then return end
for _, v in pairs(M.exclude_filetypes) do if vim.bo.filetype == v then return end end
for _, v in pairs(M.exclude_buftypes) do if vim.bo.buftype == v then return end end

Expand Down

0 comments on commit bd6905c

Please sign in to comment.