fixed copy-paste + better error handling for create_file_from_url (9pfs)
All checks were successful
/ mirror_to_github (push) Successful in 36s
/ test (push) Successful in 8s

This commit is contained in:
Leon van Kammen 2025-06-24 12:47:13 +02:00
parent c207b2da2a
commit b3fdd67ee3
2 changed files with 4 additions and 8 deletions

View file

@ -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){

View file

@ -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])