From 95795631215b6307af001047bd7ac09beb6bf0a3 Mon Sep 17 00:00:00 2001 From: tmhglnd Date: Mon, 20 Jul 2020 16:27:08 +0200 Subject: [PATCH] fixed bug where text is deleted on enter/backspace in max8.1.4 and up --- mercury_ide/external/th.gl.editor.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mercury_ide/external/th.gl.editor.js b/mercury_ide/external/th.gl.editor.js index e3bf577b..8dfe11b5 100644 --- a/mercury_ide/external/th.gl.editor.js +++ b/mercury_ide/external/th.gl.editor.js @@ -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++){ @@ -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++){ @@ -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++){