Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions client/modules/terminal-run.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ const runTerminal = promisify((options, fn) => {

CloudCmd.View.show(Terminal.element, {
afterShow: () => {
refit();
Terminal.focus();
},
afterClose: (/* exec.series args */) => {
Expand All @@ -77,6 +78,10 @@ export function hide() {
CloudCmd.View.hide();
}

// gritty fits the terminal to document.body on create,
// and refits on window resize only
const refit = () => globalThis.dispatchEvent(new Event('resize'));

const getPrefix = () => CloudCmd.prefix + '/gritty';

function getPrefixSocket() {
Expand Down
5 changes: 5 additions & 0 deletions client/modules/terminal.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,12 @@ export function show() {

CloudCmd.View.show(Terminal.element, {
afterShow: () => {
refit();
Terminal.focus();
},
});
}

// gritty fits the terminal to document.body on create,
// and refits on window resize only
const refit = () => globalThis.dispatchEvent(new Event('resize'));
Loading