Fix search not expanding selection to left when appropriate (revenge)

This commit is contained in:
Ken Aoki
2020-10-13 09:55:10 +00:00
parent b6074df4bf
commit d3d8ec3b20
+6 -1
View File
@@ -158,8 +158,13 @@ export class SearchAddon implements ITerminalAddon {
};
if (incremental) {
result = this._findInLine(term, searchPosition, searchOptions, false);
result = this._findInLine(term, searchPosition, searchOptions, false); // Try to expand selection to right first.
if (!(result && result.row === startRow && result.col === startCol)) {
// If selection was not able to be expanded to right, then reverse search begin.
if (currentSelection) {
searchPosition.startRow = currentSelection.endRow;
searchPosition.startCol = currentSelection.endColumn;
}
result = this._findInLine(term, searchPosition, searchOptions, true);
}
} else {