off-by-one in showKeyMapHelp: text after <mark> was lost

This commit is contained in:
tophf 2017-12-09 20:43:47 +03:00
parent cb32b9debf
commit db8c3585dd

View File

@ -67,7 +67,7 @@ function showKeyMapHelp() {
cell.appendChild($create('mark', match)); cell.appendChild($create('mark', match));
offset = index + match.length; offset = index + match.length;
}); });
if (offset + 1 !== text.length) { if (offset < text.length) {
cell.appendChild(document.createTextNode(text.substring(offset))); cell.appendChild(document.createTextNode(text.substring(offset)));
} }
} else { } else {