Better handle fringe case

pull/449/head
Lennart Kats 2017-07-06 08:40:53 +00:00
rodzic 448cedc3c9
commit 6f26c0da6e
1 zmienionych plików z 5 dodań i 0 usunięć

Wyświetl plik

@ -324,7 +324,12 @@ define(function(require, exports, module) {
var fromChars = target === nonPredictTerminal ? predictChars : nonPredictChars;
var toChars = target === nonPredictTerminal ? nonPredictChars : predictChars;
if (!predictChars) { // terminal likely just refreshed, never mind copying to it
state = STATE_WAIT_FOR_PROMPT_OR_ECHO;
return;
}
if (!fromChars || !toChars) {
state = STATE_WAIT_FOR_PROMPT_OR_ECHO;
errorHandler.reportError(new Error("Warning: can't copy terminal line: "), {
fromChars: fromChars, toChars: toChars
});