Skip to content

Commit 9f8e813

Browse files
committed
fix: :tab leaves forceNewTab flag true when error occurs
Fixes issue 858
1 parent 522d90f commit 9f8e813

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

common/content/tabs.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -705,9 +705,13 @@ const Tabs = Module("tabs", {
705705
commands.add(["tab"],
706706
"Execute a command and tell it to output in a new tab",
707707
function (args) {
708-
liberator.forceNewTab = true;
709-
liberator.execute(args.string, null, true);
710-
liberator.forceNewTab = false;
708+
try {
709+
liberator.forceNewTab = true;
710+
liberator.execute(args.string, null, true);
711+
}
712+
finally {
713+
liberator.forceNewTab = false;
714+
}
711715
}, {
712716
argCount: "+",
713717
completer: function (context) completion.ex(context),

0 commit comments

Comments
 (0)