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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user