Skip to content

Commit

Permalink
Merge pull request #448 from sedwards2009/side_map
Browse files Browse the repository at this point in the history
Scroll Map extension
  • Loading branch information
sedwards2009 authored Dec 23, 2024
2 parents d79cc9c + fa7d1ab commit 78fc200
Show file tree
Hide file tree
Showing 31 changed files with 748 additions and 40 deletions.
9 changes: 9 additions & 0 deletions extensions/SSHSessionBackend/src/SSHPty.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ export class SSHPty implements Pty {
onExit: Event<void>;
onAvailableWriteBufferSizeChange: Event<BufferSizeChange>;

#preliveRows = 0;
#preliveCols = 0;

constructor(log: Logger, options: PtyOptions) {
this._log = log;
this.#ptyOptions = options;
Expand Down Expand Up @@ -154,6 +157,10 @@ export class SSHPty implements Pty {
});

this.#state = PtyState.LIVE;

if (this.#preliveRows !== 0) {
this.#stream.setWindow(this.#preliveRows, this.#preliveCols, 0, 0);
}
});
});

Expand Down Expand Up @@ -486,6 +493,8 @@ export class SSHPty implements Pty {

resize(cols: number, rows: number): void {
if (this.#state !== PtyState.LIVE) {
this.#preliveCols = cols;
this.#preliveRows = rows;
return;
}
this.#stream.setWindow(rows, cols, 0, 0);
Expand Down
3 changes: 3 additions & 0 deletions extensions/ScrollMap/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: "extraterm"
};
1 change: 1 addition & 0 deletions extensions/ScrollMap/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Sidebar Scrolling Map
41 changes: 41 additions & 0 deletions extensions/ScrollMap/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"name": "scrollmap",
"displayName": "Scroll Map",
"description": "Scroll Map",
"author": "Simon Edwards",
"license": "MIT",
"version": "1.0.0",
"type": "module",
"exports": "./dist/ScrollMapExtension.cjs",
"scripts": {
"build": "yarn run build-code && yarn run build-bundle && yarn run lint",
"build-code": "tsc",
"build-bundle": "esbuild build/ScrollMapExtension.js --bundle --outfile=dist/ScrollMapExtension.cjs --platform=node --format=cjs --external:@nodegui/nodegui \"--external:nodegui-plugin-*\"",
"clean": "shx rm -rf build dist",
"lint": "eslint \"src/**/*.ts\"",
"lint-strict": "eslint --max-warnings 1 \"src/**/*.ts\""
},
"dependencies": {
"@nodegui/nodegui": "0.70.0",
"gl-matrix": "^3.3.0"
},
"devDependencies": {
"@extraterm/extraterm-extension-api": "0.15.0",
"esbuild": "^0.15.5",
"eslint": "8.53.0",
"eslint-config-extraterm": "1.0.0",
"eslint-plugin-unicorn": "42.0.0",
"extraterm-timeoutqt": "1.0.0",
"qt-construct": "0.1.0",
"shx": "^0.3.2",
"typescript": "5.2.2"
},
"contributes": {
"terminalBorderWidgets": [
{
"name": "scrollmap",
"border": "east"
}
]
}
}
Loading

0 comments on commit 78fc200

Please sign in to comment.