fixed copy-paste + better error handling for create_file_from_url (9pfs)
This commit is contained in:
parent
c207b2da2a
commit
b3fdd67ee3
2 changed files with 4 additions and 8 deletions
|
|
@ -36,7 +36,10 @@ emulator.fs9p.create_file_from_url = async function(file,url){
|
|||
let arr = new Uint8Array(buf)
|
||||
return emulator.create_file(file, arr )
|
||||
})
|
||||
.catch( console.error )
|
||||
.catch( (e) => {
|
||||
emulator.create_file(file, new Uint8Array() ) // empty file so at least other processes can check for error (v86 has no retcodes for fs9p)
|
||||
console.error(e)
|
||||
})
|
||||
}
|
||||
|
||||
emulator.fs9p.append_file = async function(file,data){
|
||||
|
|
|
|||
|
|
@ -25,16 +25,9 @@ ISOTerminal.prototype.TermInit = function(){
|
|||
// patch Term-class
|
||||
Term.prototype.move_textarea = function(){} /* *TODO* *FIXME* does not work in winbox */
|
||||
|
||||
Term.prototype.pasteHandler = function(original){
|
||||
return function (ev){
|
||||
original.apply(this,[ev])
|
||||
}
|
||||
}( Term.prototype.pasteHandler )
|
||||
|
||||
Term.prototype.keyDownHandler = function(original){
|
||||
return function (e){
|
||||
if ((e.ctrlKey || e.metaKey) && e.key === 'v') {
|
||||
debugger
|
||||
return true; // bubble up to pasteHandler (see pastedrop.js)
|
||||
}
|
||||
original.apply(this,[e])
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue