Merge branch 'master' into ligatures-addon
This commit is contained in:
+30
-30
@@ -32,22 +32,22 @@
|
|||||||
],
|
],
|
||||||
"rules": {
|
"rules": {
|
||||||
"@typescript-eslint/array-type": [
|
"@typescript-eslint/array-type": [
|
||||||
"error",
|
"warn",
|
||||||
{
|
{
|
||||||
"default": "array-simple",
|
"default": "array-simple",
|
||||||
"readonly": "generic"
|
"readonly": "generic"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"@typescript-eslint/class-name-casing": "error",
|
"@typescript-eslint/class-name-casing": "warn",
|
||||||
"@typescript-eslint/consistent-type-definitions": "error",
|
"@typescript-eslint/consistent-type-definitions": "warn",
|
||||||
"@typescript-eslint/explicit-function-return-type": [
|
"@typescript-eslint/explicit-function-return-type": [
|
||||||
"error",
|
"warn",
|
||||||
{
|
{
|
||||||
"allowExpressions": true
|
"allowExpressions": true
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"@typescript-eslint/explicit-member-accessibility": [
|
"@typescript-eslint/explicit-member-accessibility": [
|
||||||
"error",
|
"warn",
|
||||||
{
|
{
|
||||||
"accessibility": "explicit",
|
"accessibility": "explicit",
|
||||||
"overrides": {
|
"overrides": {
|
||||||
@@ -56,15 +56,15 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"@typescript-eslint/indent": [
|
"@typescript-eslint/indent": [
|
||||||
"error",
|
"warn",
|
||||||
2
|
2
|
||||||
],
|
],
|
||||||
"@typescript-eslint/interface-name-prefix": [
|
"@typescript-eslint/interface-name-prefix": [
|
||||||
"error",
|
"warn",
|
||||||
"always"
|
"always"
|
||||||
],
|
],
|
||||||
"@typescript-eslint/member-delimiter-style": [
|
"@typescript-eslint/member-delimiter-style": [
|
||||||
"error",
|
"warn",
|
||||||
{
|
{
|
||||||
"multiline": {
|
"multiline": {
|
||||||
"delimiter": "semi",
|
"delimiter": "semi",
|
||||||
@@ -77,7 +77,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"@typescript-eslint/naming-convention": [
|
"@typescript-eslint/naming-convention": [
|
||||||
"error",
|
"warn",
|
||||||
{ "selector": "default", "format": ["camelCase"] },
|
{ "selector": "default", "format": ["camelCase"] },
|
||||||
// variableLike
|
// variableLike
|
||||||
{ "selector": "variable", "format": ["camelCase", "UPPER_CASE"] },
|
{ "selector": "variable", "format": ["camelCase", "UPPER_CASE"] },
|
||||||
@@ -93,19 +93,19 @@
|
|||||||
{ "selector": "typeLike", "format": ["PascalCase"] },
|
{ "selector": "typeLike", "format": ["PascalCase"] },
|
||||||
{ "selector": "interface", "format": ["PascalCase"], "prefix": ["I"] }
|
{ "selector": "interface", "format": ["PascalCase"], "prefix": ["I"] }
|
||||||
],
|
],
|
||||||
"@typescript-eslint/prefer-namespace-keyword": "error",
|
"@typescript-eslint/prefer-namespace-keyword": "warn",
|
||||||
"@typescript-eslint/type-annotation-spacing": "error",
|
"@typescript-eslint/type-annotation-spacing": "warn",
|
||||||
"@typescript-eslint/quotes": [
|
"@typescript-eslint/quotes": [
|
||||||
"error",
|
"warn",
|
||||||
"single",
|
"single",
|
||||||
{ "allowTemplateLiterals": true }
|
{ "allowTemplateLiterals": true }
|
||||||
],
|
],
|
||||||
"@typescript-eslint/semi": [
|
"@typescript-eslint/semi": [
|
||||||
"error",
|
"warn",
|
||||||
"always"
|
"always"
|
||||||
],
|
],
|
||||||
"comma-dangle": [
|
"comma-dangle": [
|
||||||
"error",
|
"warn",
|
||||||
{
|
{
|
||||||
"objects": "never",
|
"objects": "never",
|
||||||
"arrays": "never",
|
"arrays": "never",
|
||||||
@@ -113,43 +113,43 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"curly": [
|
"curly": [
|
||||||
"error",
|
"warn",
|
||||||
"multi-line"
|
"multi-line"
|
||||||
],
|
],
|
||||||
"eol-last": "error",
|
"eol-last": "warn",
|
||||||
"eqeqeq": [
|
"eqeqeq": [
|
||||||
"error",
|
"warn",
|
||||||
"always"
|
"always"
|
||||||
],
|
],
|
||||||
"keyword-spacing": "error",
|
"keyword-spacing": "warn",
|
||||||
"new-parens": "error",
|
"new-parens": "warn",
|
||||||
"no-duplicate-imports": "error",
|
"no-duplicate-imports": "warn",
|
||||||
"no-else-return": [
|
"no-else-return": [
|
||||||
"error",
|
"warn",
|
||||||
{
|
{
|
||||||
"allowElseIf": false
|
"allowElseIf": false
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"no-eval": "error",
|
"no-eval": "warn",
|
||||||
"no-irregular-whitespace": "error",
|
"no-irregular-whitespace": "warn",
|
||||||
"no-restricted-imports": [
|
"no-restricted-imports": [
|
||||||
"error",
|
"warn",
|
||||||
{
|
{
|
||||||
"patterns": [
|
"patterns": [
|
||||||
".*\\/out\\/.*"
|
".*\\/out\\/.*"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"no-trailing-spaces": "error",
|
"no-trailing-spaces": "warn",
|
||||||
"no-unsafe-finally": "error",
|
"no-unsafe-finally": "warn",
|
||||||
"no-var": "error",
|
"no-var": "warn",
|
||||||
"one-var": [
|
"one-var": [
|
||||||
"error",
|
"warn",
|
||||||
"never"
|
"never"
|
||||||
],
|
],
|
||||||
"prefer-const": "error",
|
"prefer-const": "warn",
|
||||||
"spaced-comment": [
|
"spaced-comment": [
|
||||||
"error",
|
"warn",
|
||||||
"always",
|
"always",
|
||||||
{
|
{
|
||||||
"markers": ["/"],
|
"markers": ["/"],
|
||||||
|
|||||||
@@ -110,8 +110,12 @@ export class SearchAddon implements ITerminalAddon {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// If there is only one result, return true.
|
// If there is only one result, wrap back and return selection if it exists.
|
||||||
if (!result && currentSelection) return true;
|
if (!result && currentSelection) {
|
||||||
|
searchPosition.startRow = currentSelection.startRow;
|
||||||
|
searchPosition.startCol = 0;
|
||||||
|
result = this._findInLine(term, searchPosition, searchOptions);
|
||||||
|
}
|
||||||
|
|
||||||
// Set selection and scroll if a result was found
|
// Set selection and scroll if a result was found
|
||||||
return this._selectResult(result);
|
return this._selectResult(result);
|
||||||
@@ -175,7 +179,7 @@ export class SearchAddon implements ITerminalAddon {
|
|||||||
}
|
}
|
||||||
// If we hit the top and didn't search from the very bottom wrap back down
|
// If we hit the top and didn't search from the very bottom wrap back down
|
||||||
if (!result && startRow !== (this._terminal.buffer.active.baseY + this._terminal.rows)) {
|
if (!result && startRow !== (this._terminal.buffer.active.baseY + this._terminal.rows)) {
|
||||||
for (let y = (this._terminal.buffer.active.baseY + this._terminal.rows); y > startRow; y--) {
|
for (let y = (this._terminal.buffer.active.baseY + this._terminal.rows); y >= startRow; y--) {
|
||||||
searchPosition.startRow = y;
|
searchPosition.startRow = y;
|
||||||
result = this._findInLine(term, searchPosition, searchOptions, isReverseSearch);
|
result = this._findInLine(term, searchPosition, searchOptions, isReverseSearch);
|
||||||
if (result) {
|
if (result) {
|
||||||
|
|||||||
+1
-1
@@ -11,7 +11,7 @@
|
|||||||
"prepackage": "npm run build",
|
"prepackage": "npm run build",
|
||||||
"package": "webpack",
|
"package": "webpack",
|
||||||
"start": "node demo/start",
|
"start": "node demo/start",
|
||||||
"lint": "eslint -c .eslintrc.json --ext .ts src/ addons/",
|
"lint": "eslint -c .eslintrc.json --max-warnings 0 --ext .ts src/ addons/",
|
||||||
"test": "npm run test-unit",
|
"test": "npm run test-unit",
|
||||||
"posttest": "npm run lint",
|
"posttest": "npm run lint",
|
||||||
"test-api": "npm run test-api-chromium",
|
"test-api": "npm run test-api-chromium",
|
||||||
|
|||||||
@@ -44,12 +44,12 @@ export class ScreenDprMonitor extends Disposable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private _updateDpr(): void {
|
private _updateDpr(): void {
|
||||||
if (!this._resolutionMediaMatchList || !this._outerListener) {
|
if (!this._outerListener) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clear listeners for old DPR
|
// Clear listeners for old DPR
|
||||||
this._resolutionMediaMatchList.removeListener(this._outerListener);
|
this._resolutionMediaMatchList?.removeListener(this._outerListener);
|
||||||
|
|
||||||
// Add listeners for new DPR
|
// Add listeners for new DPR
|
||||||
this._currentDevicePixelRatio = window.devicePixelRatio;
|
this._currentDevicePixelRatio = window.devicePixelRatio;
|
||||||
|
|||||||
Reference in New Issue
Block a user