From 7bb208020c8d4b6eccc075016ada667c77e9f60a Mon Sep 17 00:00:00 2001 From: Ted Pavlic Date: Wed, 7 Jan 2009 16:06:33 -0500 Subject: [PATCH] Added expected completion for :delmarks (as discussed on IRC, because expected, it's a bugfix, not a feature) --- common/content/buffer.js | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/common/content/buffer.js b/common/content/buffer.js index 0205966a..4bea55c2 100644 --- a/common/content/buffer.js +++ b/common/content/buffer.js @@ -1651,7 +1651,21 @@ function Marks() //{{{ marks.remove(args, special); }, - { bang: true }); + { + bang: true, + completer: function (context) + { + let marks = getSortedMarks(); + + function markinfo( m ) + { + return Math.round(m.position.x * 100) + "% " + Math.round(m.position.y * 100) + "% " + m.location; + } + + context.title = ["Mark", "Line/Column/File"]; + context.completions = [[mark[0], markinfo(mark[1])] for each (mark in marks)]; + } + }); commands.add(["ma[rk]"], "Mark current location within the web page",