Skip to content

Commit 838412d

Browse files
committed
fix: :winopen leaves forcing new window flags true when error occurs
Fixes issue 856
1 parent 9f8e813 commit 838412d

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

vimperator/content/config.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,13 @@ const Config = Module("config", ConfigBase, {
209209
"Execute a command and tell it to output in a new window",
210210
function (args) {
211211
var prop = args["-private"] ? "forceNewPrivateWindow" : "forceNewWindow";
212-
liberator[prop] = true;
213-
liberator.execute(args.literalArg, null, true);
214-
liberator[prop] = false;
212+
try {
213+
liberator[prop] = true;
214+
liberator.execute(args.literalArg, null, true);
215+
}
216+
finally {
217+
liberator[prop] = false;
218+
}
215219
},
216220
{
217221
argCount: "+",

0 commit comments

Comments
 (0)