Fixed an unintentionally capitalized i
This commit is contained in:
@@ -114,8 +114,8 @@ export class SearchHelper implements ISearchHelper {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const stringLIne = this.translateBufferLineToStringWithWrap(y, true);
|
const stringLine = this.translateBufferLineToStringWithWrap(y, true);
|
||||||
const searchStringLine = searchOptions.caseSensitive ? stringLIne : stringLIne.toLowerCase();
|
const searchStringLine = searchOptions.caseSensitive ? stringLine : stringLine.toLowerCase();
|
||||||
const searchTerm = searchOptions.caseSensitive ? term : term.toLowerCase();
|
const searchTerm = searchOptions.caseSensitive ? term : term.toLowerCase();
|
||||||
let searchIndex = searchStringLine.indexOf(searchTerm);
|
let searchIndex = searchStringLine.indexOf(searchTerm);
|
||||||
|
|
||||||
|
|||||||
@@ -122,9 +122,14 @@ describe('search addon', () => {
|
|||||||
const term = new MockTerminal({cols: 20, rows: 4});
|
const term = new MockTerminal({cols: 20, rows: 4});
|
||||||
term.core.write('Hello World\r\n123....hello\r\nmoreTestHello');
|
term.core.write('Hello World\r\n123....hello\r\nmoreTestHello');
|
||||||
term.pushWriteData();
|
term.pushWriteData();
|
||||||
const hello0 = (term.searchHelper as any)._findInLine('Hello', 0, true);
|
const searchOptions = {
|
||||||
const hello1 = (term.searchHelper as any)._findInLine('Hello', 1, true);
|
regex: false,
|
||||||
const hello2 = (term.searchHelper as any)._findInLine('Hello', 2, true);
|
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(hello0).eql({col: 0, row: 0, term: 'Hello'});
|
||||||
expect(hello1).eql(undefined);
|
expect(hello1).eql(undefined);
|
||||||
expect(hello2).eql({col: 8, row: 2, term: 'Hello'});
|
expect(hello2).eql({col: 8, row: 2, term: 'Hello'});
|
||||||
|
|||||||
Reference in New Issue
Block a user