Added another test case and fixed the multi-line issue that uncovered

This commit is contained in:
Alex Ross
2018-09-10 10:22:12 -07:00
parent bc156294aa
commit 1460a34796
3 changed files with 12 additions and 10 deletions
+3 -2
View File
@@ -120,8 +120,9 @@ export class SearchHelper implements ISearchHelper {
} else {
searchIndex = lowerStringLine.indexOf(lowerTerm);
}
if (searchIndex >= 0) {
const line = this._terminal._core.buffer.lines.get(y);
const line = this._terminal._core.buffer.lines.get(y);
if ((searchIndex >= 0) && (searchIndex < line.length)) {
for (let i = 0; i < searchIndex; i++) {
const charData = line.get(i);
// Adjust the searchIndex to normalize emoji into single chars