mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-22 00:07:58 +01:00
add support for the special version of :delqmarks!
This commit is contained in:
@@ -722,15 +722,14 @@ function QuickMarks() //{{{
|
||||
/////////////////////////////////////////////////////////////////////////////{{{
|
||||
|
||||
var qmarks = {};
|
||||
// load the saved quickmarks -- TODO: change to sqlite
|
||||
var saved_marks = Options.getPref("quickmarks", "").split("\n");
|
||||
|
||||
// load the saved quickmarks -- TODO: change to sqlite
|
||||
for (var i = 0; i < saved_marks.length - 1; i += 2)
|
||||
{
|
||||
qmarks[saved_marks[i]] = saved_marks[i + 1];
|
||||
}
|
||||
|
||||
// TODO: should we sort by a-zA-Z0-9 rather than 0-9A-Za-z?
|
||||
/////////////////////////////////////////////////////////////////////////////}}}
|
||||
////////////////////// PUBLIC SECTION //////////////////////////////////////////
|
||||
/////////////////////////////////////////////////////////////////////////////{{{
|
||||
@@ -751,6 +750,11 @@ function QuickMarks() //{{{
|
||||
}
|
||||
}
|
||||
|
||||
this.removeAll = function()
|
||||
{
|
||||
qmarks = {};
|
||||
}
|
||||
|
||||
this.jumpTo = function(qmark, where)
|
||||
{
|
||||
var url = qmarks[qmark];
|
||||
|
||||
@@ -445,6 +445,9 @@ function Commands() //{{{
|
||||
return
|
||||
}
|
||||
|
||||
if (special)
|
||||
vimperator.quickmarks.removeAll();
|
||||
else
|
||||
vimperator.quickmarks.remove(args);
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user