fix incorrect handling of terminal cuts.
This commit is contained in:
@@ -247,6 +247,7 @@ impl<'a, TermMarker: Allocator<'a>> CodeGenerator<'a, TermMarker>
|
||||
if let &mut Line::Control(ref mut ctrl) = body.last_mut().unwrap() {
|
||||
*ctrl = ControlInstruction::CatchExecute;
|
||||
},
|
||||
QueryTermRef::Cut => {},
|
||||
QueryTermRef::Throw(_) =>
|
||||
if let &mut Line::Control(ref mut ctrl) = body.last_mut().unwrap() {
|
||||
*ctrl = ControlInstruction::ThrowExecute;
|
||||
|
||||
@@ -1658,7 +1658,7 @@ impl MachineState {
|
||||
}
|
||||
|
||||
if let &Terminal::Terminal = term {
|
||||
self.p = CodePtr::default();
|
||||
self.p = self.cp;
|
||||
} else {
|
||||
self.p += 1;
|
||||
}
|
||||
@@ -1680,7 +1680,7 @@ impl MachineState {
|
||||
}
|
||||
|
||||
if let &Terminal::Terminal = term {
|
||||
self.p = CodePtr::default();
|
||||
self.p = self.cp;
|
||||
} else {
|
||||
self.p += 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user