mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-17 05:58:41 -09:00
parent
64ec145b55
commit
f72093c9d7
1 changed files with 12 additions and 12 deletions
|
|
@ -127,9 +127,6 @@ module.exports = class Window {
|
||||||
const session = sessions.get(uid);
|
const session = sessions.get(uid);
|
||||||
if (session) {
|
if (session) {
|
||||||
session.exit();
|
session.exit();
|
||||||
} else {
|
|
||||||
//eslint-disable-next-line no-console
|
|
||||||
console.log('session not found by', uid);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
rpc.on('unmaximize', () => {
|
rpc.on('unmaximize', () => {
|
||||||
|
|
@ -143,11 +140,13 @@ module.exports = class Window {
|
||||||
});
|
});
|
||||||
rpc.on('resize', ({uid, cols, rows}) => {
|
rpc.on('resize', ({uid, cols, rows}) => {
|
||||||
const session = sessions.get(uid);
|
const session = sessions.get(uid);
|
||||||
|
if (session) {
|
||||||
session.resize({cols, rows});
|
session.resize({cols, rows});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
rpc.on('data', ({uid, data, escaped}) => {
|
rpc.on('data', ({uid, data, escaped}) => {
|
||||||
const session = sessions.get(uid);
|
const session = sessions.get(uid);
|
||||||
|
if (session) {
|
||||||
if (escaped) {
|
if (escaped) {
|
||||||
const escapedData = session.shell.endsWith('cmd.exe')
|
const escapedData = session.shell.endsWith('cmd.exe')
|
||||||
? `"${data}"` // This is how cmd.exe does it
|
? `"${data}"` // This is how cmd.exe does it
|
||||||
|
|
@ -157,6 +156,7 @@ module.exports = class Window {
|
||||||
} else {
|
} else {
|
||||||
session.write(data);
|
session.write(data);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
rpc.on('open external', ({url}) => {
|
rpc.on('open external', ({url}) => {
|
||||||
shell.openExternal(url);
|
shell.openExternal(url);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue