Skip to content

Commit

Permalink
fix mac clipboard missing end 2 characters (#211)
Browse files Browse the repository at this point in the history
  • Loading branch information
si458 authored Jan 18, 2024
1 parent 263bce9 commit c1b5ff3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/message-box.js
Original file line number Diff line number Diff line change
Expand Up @@ -953,7 +953,7 @@ function macos_messageBox()
ret.child.on('exit', function ()
{
var res = this.stdout.str.split('\x1e')[1];
if (res.length > 2) { res = res.substring(0, res.length - 2); }
// if (res.length > 2) { res = res.substring(0, res.length - 2); }
this.promise._res(res);
});
ret.child.stdin.write('su - ' + ret.name + '\n');
Expand Down Expand Up @@ -1130,7 +1130,7 @@ function macos_messageBox()
}
else
{
if (this._shell.stdout.str.length > 2) { this._shell.stdout.str = this._shell.stdout.str.substring(0, this._shell.stdout.str.length - 2); }
// if (this._shell.stdout.str.length > 2) { this._shell.stdout.str = this._shell.stdout.str.substring(0, this._shell.stdout.str.length - 2); }
this.end(translateObject({ command: 'readClip', clipValue: this._shell.stdout.str }));
}
break;
Expand Down

0 comments on commit c1b5ff3

Please sign in to comment.