mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 01:47:58 +01:00
Fix :finish.
This commit is contained in:
@@ -379,6 +379,8 @@ lookup:
|
|||||||
|
|
||||||
let iter = Iterator(lines);
|
let iter = Iterator(lines);
|
||||||
for (let [i, line] in iter) {
|
for (let [i, line] in iter) {
|
||||||
|
if (this.sourcing.finished)
|
||||||
|
break;
|
||||||
this.sourcing.line = i + 1;
|
this.sourcing.line = i + 1;
|
||||||
// skip line comments and blank lines
|
// skip line comments and blank lines
|
||||||
line = line.replace(/\r$/, "");
|
line = line.replace(/\r$/, "");
|
||||||
@@ -535,7 +537,10 @@ lookup:
|
|||||||
// NOTE: this command is only used in :source
|
// NOTE: this command is only used in :source
|
||||||
commands.add(["fini[sh]"],
|
commands.add(["fini[sh]"],
|
||||||
"Stop sourcing a script file",
|
"Stop sourcing a script file",
|
||||||
function () { dactyl.echoerr("E168: :finish used outside of a sourced file"); },
|
function () {
|
||||||
|
dactyl.assert(io.sourcing, "E168: :finish used outside of a sourced file");
|
||||||
|
io.sourcing.finished = true;
|
||||||
|
},
|
||||||
{ argCount: "0" });
|
{ argCount: "0" });
|
||||||
|
|
||||||
commands.add(["pw[d]"],
|
commands.add(["pw[d]"],
|
||||||
|
|||||||
Reference in New Issue
Block a user