aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/spawn.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/spawn.cpp b/src/spawn.cpp
index c63a6c1..24d8307 100644
--- a/src/spawn.cpp
+++ b/src/spawn.cpp
@@ -207,6 +207,12 @@ StateExecuteCommand::initial(void)
ctx.to = interface.ssm(SCI_POSITIONFROMLINE, line);
rc = TECO_BOOL(Validate::line(line));
+ if (ctx.to < ctx.from) {
+ tecoInt temp = ctx.from;
+ ctx.from = ctx.to;
+ ctx.to = temp;
+ }
+
break;
}