mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-12 20:18:41 -09:00
parent
a3db3670be
commit
ba93421933
2 changed files with 9 additions and 3 deletions
|
|
@ -189,7 +189,7 @@ export default class Term extends React.PureComponent {
|
|||
if (processed) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
this.term.send(processed);
|
||||
this.term._core.handler(processed);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,16 @@
|
|||
import {clipboard} from 'electron';
|
||||
import plist from 'plist';
|
||||
|
||||
const getPath = platform => {
|
||||
switch (platform) {
|
||||
case 'darwin': {
|
||||
const filepath = clipboard.read('public.file-url');
|
||||
return filepath.replace('file://', '');
|
||||
if (clipboard.has('NSFilenamesPboardType')) {
|
||||
// Parse plist file containing the path list of copied files
|
||||
const list = plist.parse(clipboard.read('NSFilenamesPboardType'));
|
||||
return "'" + list.join("' '") + "'";
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
case 'win32': {
|
||||
const filepath = clipboard.read('FileNameW');
|
||||
|
|
|
|||
Loading…
Reference in a new issue