diff options
author | anekos | 2008-10-01 18:39:02 +0000 |
---|---|---|
committer | anekos | 2008-10-01 18:39:02 +0000 |
commit | 4a280518d1f999101753a819e396c1e7c74756d4 (patch) | |
tree | 733cd2b67c4eda2ee3e1e3b4feec5e7d1ba7db49 /migemized_find.js | |
parent | 3f11efc93457759337997f7b7b82a25892b12cd1 (diff) | |
download | vimperator-plugins-4a280518d1f999101753a819e396c1e7c74756d4.tar.bz2 |
・highlight コマンドで見つかった個数を echo するようにした
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@20434 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to 'migemized_find.js')
-rw-r--r-- | migemized_find.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/migemized_find.js b/migemized_find.js index 0a85b55..90da1e5 100644 --- a/migemized_find.js +++ b/migemized_find.js @@ -2,7 +2,7 @@ // @name Migemized Find // @description-ja デフォルトのドキュメント内検索をミゲマイズする。 // @license Creative Commons 2.1 (Attribution + Share Alike) -// @version 2.0 +// @version 2.2 // ==/VimperatorPlugin== // // Usage: @@ -334,6 +334,8 @@ } this.storage.highlightRemovers[color] = function () { removers.forEach(function (it) it.call()); }; + + return removers; }, }; @@ -398,7 +400,9 @@ ['hl', 'highlight'], 'Highlight matched words', function (opts) { - MF.highlightAll(opts.arguments.join(' '), opts['-color']); + let r = MF.highlightAll(opts.arguments.join(' '), opts['-color']); + echo(r ? r.length + ' words highlighted.' + : 'word not found.'); }, { options: [ |