Skip to content

Commit

Permalink
fix: toggleterm
Browse files Browse the repository at this point in the history
  • Loading branch information
XXiaoA committed May 25, 2024
1 parent 092986f commit 3817cc4
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lua/config/plugins/toggleterm.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ M.config = function()
end,
})

-- 新建浮动终端
local floatTerm = Terminal:new({
hidden = true,
direction = "float",
Expand All @@ -34,10 +33,8 @@ M.config = function()
vim.cmd.startinsert()
end,
})

-- 定义新的方法
tg.float_toggle = function()
vim.cmd.w()
pcall(vim.cmd.w)
floatTerm:toggle()
end

Expand Down

0 comments on commit 3817cc4

Please sign in to comment.