Merge branch 'master' into parser_colon_notation
This commit is contained in:
@@ -38,7 +38,7 @@ export class SearchAddon implements ITerminalAddon {
|
|||||||
this._terminal = terminal;
|
this._terminal = terminal;
|
||||||
}
|
}
|
||||||
|
|
||||||
public dispose(): void {}
|
public dispose(): void { }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Find the next instance of the term, then scroll to and select it. If it
|
* Find the next instance of the term, then scroll to and select it. If it
|
||||||
@@ -234,7 +234,7 @@ export class SearchAddon implements ITerminalAddon {
|
|||||||
*/
|
*/
|
||||||
private _isWholeWord(searchIndex: number, line: string, term: string): boolean {
|
private _isWholeWord(searchIndex: number, line: string, term: string): boolean {
|
||||||
return (((searchIndex === 0) || (NON_WORD_CHARACTERS.indexOf(line[searchIndex - 1]) !== -1)) &&
|
return (((searchIndex === 0) || (NON_WORD_CHARACTERS.indexOf(line[searchIndex - 1]) !== -1)) &&
|
||||||
(((searchIndex + term.length) === line.length) || (NON_WORD_CHARACTERS.indexOf(line[searchIndex + term.length]) !== -1)));
|
(((searchIndex + term.length) === line.length) || (NON_WORD_CHARACTERS.indexOf(line[searchIndex + term.length]) !== -1)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -373,7 +373,9 @@ export class SearchAddon implements ITerminalAddon {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
terminal.select(result.col, result.row, result.term.length);
|
terminal.select(result.col, result.row, result.term.length);
|
||||||
terminal.scrollLines(result.row - terminal.buffer.viewportY);
|
let scroll = result.row - terminal.buffer.viewportY;
|
||||||
|
scroll = scroll - Math.floor(terminal.rows / 2);
|
||||||
|
terminal.scrollLines(scroll);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -258,7 +258,11 @@ export class AccessibilityManager extends Disposable {
|
|||||||
const posInSet = (buffer.ydisp + i + 1).toString();
|
const posInSet = (buffer.ydisp + i + 1).toString();
|
||||||
const element = this._rowElements[i];
|
const element = this._rowElements[i];
|
||||||
if (element) {
|
if (element) {
|
||||||
element.textContent = lineData.length === 0 ? Strings.blankLine : lineData;
|
if (lineData.length === 0) {
|
||||||
|
element.innerHTML = ' ';
|
||||||
|
} else {
|
||||||
|
element.textContent = lineData;
|
||||||
|
}
|
||||||
element.setAttribute('aria-posinset', posInSet);
|
element.setAttribute('aria-posinset', posInSet);
|
||||||
element.setAttribute('aria-setsize', setSize);
|
element.setAttribute('aria-setsize', setSize);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,5 @@
|
|||||||
* @license MIT
|
* @license MIT
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export let blankLine = 'Blank line';
|
|
||||||
export let promptLabel = 'Terminal input';
|
export let promptLabel = 'Terminal input';
|
||||||
export let tooMuchOutput = 'Too much output to announce, navigate to rows manually to read';
|
export let tooMuchOutput = 'Too much output to announce, navigate to rows manually to read';
|
||||||
|
|||||||
@@ -506,7 +506,7 @@ export class SelectionService implements ISelectionService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Return early if the click event is not in the buffer (eg. in scroll bar)
|
// Return early if the click event is not in the buffer (eg. in scroll bar)
|
||||||
if (line.length >= this._model.selectionStart[0]) {
|
if (line.length === this._model.selectionStart[0]) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Vendored
-5
@@ -316,11 +316,6 @@ declare module 'xterm' {
|
|||||||
* The set of localizable strings.
|
* The set of localizable strings.
|
||||||
*/
|
*/
|
||||||
export interface ILocalizableStrings {
|
export interface ILocalizableStrings {
|
||||||
/**
|
|
||||||
* Announcement for a blank line when `screenReaderMode` is enabled.
|
|
||||||
*/
|
|
||||||
blankLine: string;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The aria label for the underlying input textarea for the terminal.
|
* The aria label for the underlying input textarea for the terminal.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user