mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-03 18:24:11 +01:00
Some cherry-picked changes from my next mode-refactoring commit.
This commit is contained in:
@@ -347,8 +347,10 @@ const Hints = Module("hints", {
|
|||||||
let prefix = (elem.getAttributeNS(NS, "class") || "") + " ";
|
let prefix = (elem.getAttributeNS(NS, "class") || "") + " ";
|
||||||
if (active)
|
if (active)
|
||||||
elem.setAttributeNS(NS, "highlight", prefix + "HintActive");
|
elem.setAttributeNS(NS, "highlight", prefix + "HintActive");
|
||||||
else
|
else if (active != null)
|
||||||
elem.setAttributeNS(NS, "highlight", prefix + "HintElem");
|
elem.setAttributeNS(NS, "highlight", prefix + "HintElem");
|
||||||
|
else
|
||||||
|
elem.removeAttributeNS(NS, "highlight");
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -429,7 +431,6 @@ const Hints = Module("hints", {
|
|||||||
*/
|
*/
|
||||||
_removeHints: function (timeout, slight) {
|
_removeHints: function (timeout, slight) {
|
||||||
for (let [,{ doc: doc, start: start, end: end }] in Iterator(this._docs)) {
|
for (let [,{ doc: doc, start: start, end: end }] in Iterator(this._docs)) {
|
||||||
util.dump(String(doc), start, end);
|
|
||||||
for (let elem in util.evaluateXPath("//*[@dactyl:highlight='hints']", doc))
|
for (let elem in util.evaluateXPath("//*[@dactyl:highlight='hints']", doc))
|
||||||
elem.parentNode.removeChild(elem);
|
elem.parentNode.removeChild(elem);
|
||||||
for (let i in util.range(start, end + 1))
|
for (let i in util.range(start, end + 1))
|
||||||
@@ -489,12 +490,10 @@ const Hints = Module("hints", {
|
|||||||
|
|
||||||
let n = 5;
|
let n = 5;
|
||||||
(function next() {
|
(function next() {
|
||||||
this._setClass(elem, n % 2);
|
let hinted = n || this._validHints.some(function (e) e === elem);
|
||||||
util.dump(n, String(this._top));
|
this._setClass(elem, n ? n % 2 : !hinted ? null : this._validHints[Math.max(0, this._hintNumber-1)] === elem);
|
||||||
if (n--)
|
if (n--)
|
||||||
this.timeout(next, 50);
|
this.timeout(next, 50);
|
||||||
else if (!this._validHints.some(function (h) h.elem == elem))
|
|
||||||
elem.removeAttributeNS(NS, "highlight");
|
|
||||||
}).call(this);
|
}).call(this);
|
||||||
|
|
||||||
this.timeout(function () {
|
this.timeout(function () {
|
||||||
|
|||||||
@@ -21,6 +21,13 @@
|
|||||||
* Multiple Ex commands may now be separated by |
|
* Multiple Ex commands may now be separated by |
|
||||||
* Command-line is now hidden by default. Added C and M to
|
* Command-line is now hidden by default. Added C and M to
|
||||||
'guioptions'.
|
'guioptions'.
|
||||||
|
* Hint mode improvements, including:
|
||||||
|
- Added g; continued extended hint mode, which allows
|
||||||
|
selecting multiple hints. Removed ;F
|
||||||
|
- Hints are now updated after scrolling and window resizing.
|
||||||
|
- Added ;S mode for creating search keywords.
|
||||||
|
- Added 'hintkeys' option.
|
||||||
|
- Added "transliterated" option to 'hintmatching'.
|
||||||
* JavaScript completion improvements, including:
|
* JavaScript completion improvements, including:
|
||||||
- The prototype of the function whose arguments are currently
|
- The prototype of the function whose arguments are currently
|
||||||
being typed is displayed during completion.
|
being typed is displayed during completion.
|
||||||
@@ -48,7 +55,6 @@
|
|||||||
* IMPORTANT: 'guioptions' default value has changed.
|
* IMPORTANT: 'guioptions' default value has changed.
|
||||||
* IMPORTANT: 'mapleader' is now an option rather than a :let
|
* IMPORTANT: 'mapleader' is now an option rather than a :let
|
||||||
variable.
|
variable.
|
||||||
* Added g; continued extended hint mode and removed ;F
|
|
||||||
* Added "bookmarks", "diverted", and "links" to 'activate'
|
* Added "bookmarks", "diverted", and "links" to 'activate'
|
||||||
option
|
option
|
||||||
* Added 'altwildmode' and <A-Tab> command-line key binding.
|
* Added 'altwildmode' and <A-Tab> command-line key binding.
|
||||||
@@ -59,8 +65,6 @@
|
|||||||
* Added -keyword, -tags, -title to :delbmarks.
|
* Added -keyword, -tags, -title to :delbmarks.
|
||||||
* Added "passwords" and "venkman" dialogs to :dialog.
|
* Added "passwords" and "venkman" dialogs to :dialog.
|
||||||
* Added :extupdate command
|
* Added :extupdate command
|
||||||
* Added 'hintkeys' option.
|
|
||||||
* Added "transliterated" option to 'hintmatching'.
|
|
||||||
* Replaced 'focuscontent' with 'strictfocus'.
|
* Replaced 'focuscontent' with 'strictfocus'.
|
||||||
* Changed 'urlseparator' default value to '|'
|
* Changed 'urlseparator' default value to '|'
|
||||||
* Added 'wildanchor' option.
|
* Added 'wildanchor' option.
|
||||||
|
|||||||
Reference in New Issue
Block a user