mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
Fix search not expanding selection to left when appropriate (revenge)
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user