In the content controller, if the parse has a number, add repeat

This commit is contained in:
Saul Reynolds-Haertle 2019-05-04 14:11:46 -07:00
parent 77d84a1a9e
commit c822a233de

View file

@ -102,6 +102,7 @@ function* ParserController() {
while (true) {
let exstr = ""
let repeat = 1
let keyEvents: KeyboardEvent[] = []
try {
while (true) {
@ -154,6 +155,7 @@ function* ParserController() {
if (response.exstr) {
exstr = response.exstr
repeat = response.numericPrefix
break
} else {
keyEvents = response.keys
@ -164,6 +166,10 @@ function* ParserController() {
logger.debug("suffix: ", contentState.suffix)
}
}
if (repeat > 1) {
exstr = "repeat " + repeat.toString() + " " + exstr
logger.debug("repeating: ", repeat)
}
controller.acceptExCmd(exstr)
contentState.suffix = ""
} catch (e) {