aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2014-11-09 23:24:03 +0100
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2014-11-09 23:24:03 +0100
commit19c965f05effc629057dc425e2e7771969e65932 (patch)
treebec5fe1fa31900ffeae597adebee12936f46f1e4
parent20d1f0e1e8cddf461494e8933eda808a465cb542 (diff)
downloadsciteco-19c965f05effc629057dc425e2e7771969e65932.tar.gz
fixed EC command for negative line ranges
-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;
}