From 5b17f32ac5b27d9e779ab9c60ecbe0eaeb8cc141 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Wed, 1 Oct 2008 07:17:46 +0000 Subject: [PATCH] fix :marks position columns output --- content/buffer.js | 4 ++-- content/liberator.js | 8 +++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/content/buffer.js b/content/buffer.js index e72943a0..27ae12ba 100644 --- a/content/buffer.js +++ b/content/buffer.js @@ -1379,8 +1379,8 @@ liberator.Buffer = function () //{{{ {[ {mark[0]} - {Math.round(mark[1].position.y & 100)}% - {Math.round(mark[1].position.x & 100)}% + {Math.round(mark[1].position.y * 100)}% + {Math.round(mark[1].position.x * 100)}% {mark[1].location} for each (mark in marks)].reduce(this.add, <>) diff --git a/content/liberator.js b/content/liberator.js index 2c5d1a53..3649e921 100644 --- a/content/liberator.js +++ b/content/liberator.js @@ -789,7 +789,13 @@ const liberator = (function () //{{{ } }, - echo: function (str, flags) { liberator.commandline.echo(str, liberator.commandline.HL_NORMAL, flags); }, + echo: function (str, flags) { + + var commandlineHandler = Components.classes["@mozilla.org/commandlinehandler/general-startup;1?type=vimperator"] + .createInstance(Components.interfaces.nsICommandlineHandler); + alert(commandlineHandler.handle) + liberator.commandline.echo(str, liberator.commandline.HL_NORMAL, flags); + }, // TODO: Vim replaces unprintable characters in echoerr/echomsg echoerr: function (str, flags)