mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-12 20:18: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);
|
||||
if (session) {
|
||||
session.exit();
|
||||
} else {
|
||||
//eslint-disable-next-line no-console
|
||||
console.log('session not found by', uid);
|
||||
}
|
||||
});
|
||||
rpc.on('unmaximize', () => {
|
||||
|
|
@ -143,11 +140,13 @@ module.exports = class Window {
|
|||
});
|
||||
rpc.on('resize', ({uid, cols, rows}) => {
|
||||
const session = sessions.get(uid);
|
||||
if (session) {
|
||||
session.resize({cols, rows});
|
||||
}
|
||||
});
|
||||
rpc.on('data', ({uid, data, escaped}) => {
|
||||
const session = sessions.get(uid);
|
||||
|
||||
if (session) {
|
||||
if (escaped) {
|
||||
const escapedData = session.shell.endsWith('cmd.exe')
|
||||
? `"${data}"` // This is how cmd.exe does it
|
||||
|
|
@ -157,6 +156,7 @@ module.exports = class Window {
|
|||
} else {
|
||||
session.write(data);
|
||||
}
|
||||
}
|
||||
});
|
||||
rpc.on('open external', ({url}) => {
|
||||
shell.openExternal(url);
|
||||
|
|
|
|||
Loading…
Reference in a new issue