From 19c965f05effc629057dc425e2e7771969e65932 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Sun, 9 Nov 2014 23:24:03 +0100 Subject: fixed EC command for negative line ranges --- src/spawn.cpp | 6 ++++++ 1 file changed, 6 insertions(+) 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; } -- cgit v1.2.3