aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormusjj <72612857+musjj@users.noreply.github.com>2022-08-17 19:35:42 +0700
committerGitHub <noreply@github.com>2022-08-17 19:35:42 +0700
commit418f17fb2fba1dbb9ed64617db4098a0bdc0ba94 (patch)
tree622ad9d99d399e328c00f672a50e1bbed5dc45ee
parentMerge pull request #18 from shaun-mathew/patch-1 (diff)
fix exception when showing a terminal window
Sometimes `nvterm.show` crashes with an `termutil.lua:33: Expected lua table` exception
-rw-r--r--lua/nvterm/terminal.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/lua/nvterm/terminal.lua b/lua/nvterm/terminal.lua
index d797b73..b48a5e6 100644
--- a/lua/nvterm/terminal.lua
+++ b/lua/nvterm/terminal.lua
@@ -107,6 +107,7 @@ nvterm.hide = function(type)
end
nvterm.show = function(type)
+ terminals = util.verify_terminals(terminals)
local term = type and get_type_last(type) or terminals.last
nvterm.show_term(term)
end