Skip to content

Commit 9579563

Browse files
committed
fixed bug where text is deleted on enter/backspace in max8.1.4 and up
1 parent 120f1be commit 9579563

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

mercury_ide/external/th.gl.editor.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ function newLine(){
385385
totalLines = textMtx.dim[1] + 1;
386386
// copy the matrix
387387
var copyMtx = new JitterMatrix(1, "char", LINE_CHARS, textMtx.dim[1]);
388-
copyMtx.frommatrix(textMtx);
388+
copyMtx.frommatrix(textMtx.name);
389389
emptyMatrix(totalLines);
390390
// store everything before cursor in text matrix
391391
for (var y = 0; y < curLine; y++){
@@ -419,7 +419,7 @@ function removeLine(){
419419
totalLines = Math.max(1, textMtx.dim[1] - 1);
420420
// copy the matrix
421421
var copyMtx = new JitterMatrix(1, "char", LINE_CHARS, textMtx.dim[1]);
422-
copyMtx.frommatrix(textMtx);
422+
copyMtx.frommatrix(textMtx.name);
423423
emptyMatrix(totalLines);
424424
// store all lines before cursor in text matrix
425425
for (var y = 0; y < curLine; y++){
@@ -454,7 +454,7 @@ function deleteLine(){
454454
totalLines = Math.max(1, textMtx.dim[1] - 1);
455455
// copy the matrix
456456
var copyMtx = new JitterMatrix(1, "char", LINE_CHARS, textMtx.dim[1]);
457-
copyMtx.frommatrix(textMtx);
457+
copyMtx.frommatrix(textMtx.name);
458458
emptyMatrix(totalLines);
459459
// store all lines before cursor in text matrix
460460
for (var y = 0; y < curLine+1; y++){

0 commit comments

Comments
 (0)