Skip to content

Commit

Permalink
Merge pull request #1131 from Dyalog/ib3500_xmldec
Browse files Browse the repository at this point in the history
I-beam 3500 utf-8 encoding
  • Loading branch information
e9gille authored Sep 6, 2023
2 parents 2126057 + d50d2d3 commit 6d38e13
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/ide.js
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,8 @@ D.IDE = function IDE(opts = {}) {
const path = nodeRequire('path');
const file = path.join(D.el.app.getPath('temp'), 'ib3500.html');
fs.existsSync(file) && fs.rmSync(file, { force: true });
fs.writeFileSync(file, x.html, { encoding: 'utf8' });
const html = `<?xml version="1.0" encoding="UTF-8"?>${x.html}`;
fs.writeFileSync(file, html, { encoding: 'utf8' });
w.loadURL(`file://${file}`);
w.setTitle(x.title || '3500 I-beam');
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/se.js
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ D.Se.prototype = {
allLines.reverse().forEach((l) => {
if (se.dirty[l] === 0) {
se.edit([{
range: new monaco.Range(l, 1, l + 1, 1),
range: new monaco.Range(l - 1, model.getLineMaxColumn(l - 1), l, 1),
text: '',
}]);
} else {
Expand Down

0 comments on commit 6d38e13

Please sign in to comment.