From 0c505415a08bda85f3c840ca409ef36e3d1213a9 Mon Sep 17 00:00:00 2001 From: Martin Stubenschrott Date: Fri, 19 Oct 2007 18:32:06 +0000 Subject: [PATCH] changed to error printing --- content/editor.js | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/content/editor.js b/content/editor.js index 8901c540..8638ad03 100644 --- a/content/editor.js +++ b/content/editor.js @@ -303,18 +303,13 @@ function Editor() //{{{ this.editWithExternalEditor = function() { - function err(msg) - { - vimperator.callFunctionInThread(null, vimperator.echoerr, [msg]); - } - var textBox = document.commandDispatcher.focusedElement; var editor = vimperator.options["editor"]; var args = []; args = editor.split(" "); if (args.length < 1) { - err("no editor specified"); + vimperator.echoerr("no editor specified"); return; } @@ -324,7 +319,7 @@ function Editor() //{{{ } catch (e) { - err("Could not create temporary file: " + e.message); + vimperator.echoerr("Could not create temporary file: " + e.message); return; } try @@ -333,7 +328,7 @@ function Editor() //{{{ } catch (e) { - err("Could not write to temporary file " + tmpfile.path + ": " + e.message); + vimperator.echoerr("Could not write to temporary file " + tmpfile.path + ": " + e.message); return; } @@ -359,7 +354,7 @@ function Editor() //{{{ } catch (e) { - err("Could not read from temporary file " + tmpfile.path + ": " + e.message); + vimperator.echoerr("Could not read from temporary file " + tmpfile.path + ": " + e.message); } } tmpfile.remove(false);