Fix incremental search bug

This commit is contained in:
Logan Ramos
2019-07-25 08:50:37 -07:00
parent db936701f4
commit ea72a3b594
+8 -2
View File
@@ -137,8 +137,14 @@ export class SearchAddon implements ITerminalAddon {
this._initLinesCache();
// Search startRow
result = incremental ? this._findInLine(term, startRow, startCol, searchOptions, false) : this._findInLine(term, startRow, startCol, searchOptions, isReverseSearch);
if (incremental) {
result = this._findInLine(term, startRow, startCol, searchOptions, false);
if (!(result && result.row === startRow && result.col === startCol)) {
result = this._findInLine(term, startRow, startCol, searchOptions, true);
}
} else {
result = this._findInLine(term, startRow, startCol, searchOptions, isReverseSearch);
}
// Search from startRow - 1 to top
if (!result) {