From 8e8dd9687a9fef239ccb6fcb0572c13dd4c534d5 Mon Sep 17 00:00:00 2001
From: hogelog
Date: Tue, 27 Jan 2009 14:59:22 +0000
Subject: * fix labeling algorithm
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@29138 d0d07461-0603-4401-acd4-de1884942a52
---
char-hints-mod2.js | 25 +++++++++++++------------
1 file changed, 13 insertions(+), 12 deletions(-)
diff --git a/char-hints-mod2.js b/char-hints-mod2.js
index 139f87a..6645503 100644
--- a/char-hints-mod2.js
+++ b/char-hints-mod2.js
@@ -4,10 +4,10 @@ var PLUGIN_INFO =
{NAME}
character hint mode.
hogelog
- 0.2.0
+ 0.2.1
2.0pre 2008/12/12
2.0a1
- 2009/1/27 18:56
+ 2009/1/27 23:52
http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk/char-hints-mod2.js
= 1.0) {
- ++figure;
+ let next;
+ while((next = Math.floor(count/base)) > 0) {
+ count = next;
}
- return Math.pow(base, figure-1) - 1;
+ return count;
} //}}}
function getCharHints(win) //{{{
{
let hints = [];
(function (win) {
- let elems = [elem for(elem in buffer.evaluateXPath("//*[@liberator:highlight and @number]", win.document))];
+ let elems = [elem for(elem in buffer.evaluateXPath('//*[@liberator:highlight="Hint" and @number]', win.document))];
hints = hints.concat(elems);
Array.forEach(win.frames, arguments.callee);
})(win);
@@ -109,11 +110,11 @@ let g:hintsio:
} //}}}
function showCharHints(hints) //{{{
{
- let start = getStartNum(hintchars.length, hints.length);
+ let msd = getMSD(hintchars.length, hints.length);
for(let i=0,len=hints.length;i