mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
Fixed an unintentionally capitalized i
This commit is contained in:
@@ -114,8 +114,8 @@ export class SearchHelper implements ISearchHelper {
|
||||
return;
|
||||
}
|
||||
|
||||
const stringLIne = this.translateBufferLineToStringWithWrap(y, true);
|
||||
const searchStringLine = searchOptions.caseSensitive ? stringLIne : stringLIne.toLowerCase();
|
||||
const stringLine = this.translateBufferLineToStringWithWrap(y, true);
|
||||
const searchStringLine = searchOptions.caseSensitive ? stringLine : stringLine.toLowerCase();
|
||||
const searchTerm = searchOptions.caseSensitive ? term : term.toLowerCase();
|
||||
let searchIndex = searchStringLine.indexOf(searchTerm);
|
||||
|
||||
|
||||
@@ -122,9 +122,14 @@ describe('search addon', () => {
|
||||
const term = new MockTerminal({cols: 20, rows: 4});
|
||||
term.core.write('Hello World\r\n123....hello\r\nmoreTestHello');
|
||||
term.pushWriteData();
|
||||
const hello0 = (term.searchHelper as any)._findInLine('Hello', 0, true);
|
||||
const hello1 = (term.searchHelper as any)._findInLine('Hello', 1, true);
|
||||
const hello2 = (term.searchHelper as any)._findInLine('Hello', 2, true);
|
||||
const searchOptions = {
|
||||
regex: false,
|
||||
wholeWord: false,
|
||||
caseSensitive: true
|
||||
};
|
||||
const hello0 = (term.searchHelper as any)._findInLine('Hello', 0, searchOptions);
|
||||
const hello1 = (term.searchHelper as any)._findInLine('Hello', 1, searchOptions);
|
||||
const hello2 = (term.searchHelper as any)._findInLine('Hello', 2, searchOptions);
|
||||
expect(hello0).eql({col: 0, row: 0, term: 'Hello'});
|
||||
expect(hello1).eql(undefined);
|
||||
expect(hello2).eql({col: 8, row: 2, term: 'Hello'});
|
||||
|
||||
Reference in New Issue
Block a user