Skip to content

Commit

Permalink
fixed bug where text is deleted on enter/backspace in max8.1.4 and up
Browse files Browse the repository at this point in the history
  • Loading branch information
tmhglnd committed Jul 20, 2020
1 parent 120f1be commit 9579563
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mercury_ide/external/th.gl.editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ function newLine(){
totalLines = textMtx.dim[1] + 1;
// copy the matrix
var copyMtx = new JitterMatrix(1, "char", LINE_CHARS, textMtx.dim[1]);
copyMtx.frommatrix(textMtx);
copyMtx.frommatrix(textMtx.name);
emptyMatrix(totalLines);
// store everything before cursor in text matrix
for (var y = 0; y < curLine; y++){
Expand Down Expand Up @@ -419,7 +419,7 @@ function removeLine(){
totalLines = Math.max(1, textMtx.dim[1] - 1);
// copy the matrix
var copyMtx = new JitterMatrix(1, "char", LINE_CHARS, textMtx.dim[1]);
copyMtx.frommatrix(textMtx);
copyMtx.frommatrix(textMtx.name);
emptyMatrix(totalLines);
// store all lines before cursor in text matrix
for (var y = 0; y < curLine; y++){
Expand Down Expand Up @@ -454,7 +454,7 @@ function deleteLine(){
totalLines = Math.max(1, textMtx.dim[1] - 1);
// copy the matrix
var copyMtx = new JitterMatrix(1, "char", LINE_CHARS, textMtx.dim[1]);
copyMtx.frommatrix(textMtx);
copyMtx.frommatrix(textMtx.name);
emptyMatrix(totalLines);
// store all lines before cursor in text matrix
for (var y = 0; y < curLine+1; y++){
Expand Down

0 comments on commit 9579563

Please sign in to comment.