Skip to content

Commit b3fdd67

Browse files
fixed copy-paste + better error handling for create_file_from_url (9pfs)
1 parent c207b2d commit b3fdd67

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

com/isoterminal/feat/9pfs_utils.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,10 @@ emulator.fs9p.create_file_from_url = async function(file,url){
3636
let arr = new Uint8Array(buf)
3737
return emulator.create_file(file, arr )
3838
})
39-
.catch( console.error )
39+
.catch( (e) => {
40+
emulator.create_file(file, new Uint8Array() ) // empty file so at least other processes can check for error (v86 has no retcodes for fs9p)
41+
console.error(e)
42+
})
4043
}
4144

4245
emulator.fs9p.append_file = async function(file,data){

com/isoterminal/feat/term.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,9 @@ ISOTerminal.prototype.TermInit = function(){
2525
// patch Term-class
2626
Term.prototype.move_textarea = function(){} /* *TODO* *FIXME* does not work in winbox */
2727

28-
Term.prototype.pasteHandler = function(original){
29-
return function (ev){
30-
original.apply(this,[ev])
31-
}
32-
}( Term.prototype.pasteHandler )
33-
3428
Term.prototype.keyDownHandler = function(original){
3529
return function (e){
3630
if ((e.ctrlKey || e.metaKey) && e.key === 'v') {
37-
debugger
3831
return true; // bubble up to pasteHandler (see pastedrop.js)
3932
}
4033
original.apply(this,[e])

0 commit comments

Comments
 (0)