1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-21 23:08:00 +01:00

Add 'fileencoding'

This commit is contained in:
Kris Maglione
2009-05-01 15:19:35 -04:00
parent e5dc623247
commit dbf60914ab
5 changed files with 62 additions and 15 deletions

View File

@@ -894,12 +894,10 @@ function Editor() //{{{
else
return false;
let oldbg, tmpBg;
let oldBg, tmpBg;
try
{
let res = io.withTempFiles(function (tmpfile) {
io.writeFile(tmpfile, text);
if (textBox)
{
textBox.setAttribute("readonly", "true");
@@ -908,6 +906,10 @@ function Editor() //{{{
textBox.style.backgroundColor = "#bbbbbb";
}
if (!io.writeFile(tmpfile, text))
throw "Input contains characters not valid in the current " +
"file encoding";
this.editFileExternally(tmpfile.path);
if (textBox)