mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-16 05:38: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) {
|
if (processed) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
this.term.send(processed);
|
this.term._core.handler(processed);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,16 @@
|
||||||
import {clipboard} from 'electron';
|
import {clipboard} from 'electron';
|
||||||
|
import plist from 'plist';
|
||||||
|
|
||||||
const getPath = platform => {
|
const getPath = platform => {
|
||||||
switch (platform) {
|
switch (platform) {
|
||||||
case 'darwin': {
|
case 'darwin': {
|
||||||
const filepath = clipboard.read('public.file-url');
|
if (clipboard.has('NSFilenamesPboardType')) {
|
||||||
return filepath.replace('file://', '');
|
// 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': {
|
case 'win32': {
|
||||||
const filepath = clipboard.read('FileNameW');
|
const filepath = clipboard.read('FileNameW');
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue