aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpekepeke2008-11-01 13:30:36 +0000
committerpekepeke2008-11-01 13:30:36 +0000
commit404e69c64bdd145a97ecb162ee5bed935083b72f (patch)
treefbfe437674a04fb2d2f3598a5248c260b133877f
parent2fb279b4709d6cbbf2987384a81d9af6593b003c (diff)
downloadvimperator-plugins-404e69c64bdd145a97ecb162ee5bed935083b72f.tar.bz2
暫定バグ対応
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@22523 d0d07461-0603-4401-acd4-de1884942a52
-rw-r--r--localkeymode.js27
1 files changed, 18 insertions, 9 deletions
diff --git a/localkeymode.js b/localkeymode.js
index 700c78c..c6c26eb 100644
--- a/localkeymode.js
+++ b/localkeymode.js
@@ -96,12 +96,13 @@ liberator.plugins.LocalKeyMode = (function(){
LocalKeyMode.prototype = {
// 初期化メソッド
initialize: function() {
- this.storekeymaps = [];
- this.delkeychars = [];
- this.keymapnames = [];
- this.localkeymaps = [];
- this.completeNames;
- this.tabinfo = [];
+ this.storekeymaps = []; //キー待避用(戻し)
+ this.delkeychars = []; //キー待避用(削除)
+ this.keymapnames = []; // 対応URI保持
+ this.localkeymaps = []; // キーマップ保持用
+ this.completeNames; // 補完用
+ this.tabinfo = []; // タブごとの状態保持用
+ this.helpstring = "";
var global = liberator.globalVariables;
this.panel = this.setupStatusBar();
@@ -209,6 +210,7 @@ liberator.plugins.LocalKeyMode = (function(){
keymaps.removekeys.forEach( function( key ){
var org = mappings.get( modes.NORMAL, key);
if (org) self.storekeymaps.push( cloneMap(org) );
+ self.helpstring += key+" -> [Delete KeyMap]\n";
mappings.remove( modes.NORMAL, key);
} );
keymaps.keys.forEach( function( m ) {
@@ -219,6 +221,7 @@ liberator.plugins.LocalKeyMode = (function(){
} );
mappings.addUserMap([modes.NORMAL], m.names, m.description, m.action,
{flags:m.flags, rhs: m.rhs, noremap: m.noremap });
+ self.helpstring += m.names+" -> "+m.rhs+"\n";
} );
this.isBinding = true;
},
@@ -234,6 +237,9 @@ liberator.plugins.LocalKeyMode = (function(){
},
// ローカルキーマップセット処理
loadKeyMap: function() {
+ // 暫定処置
+ if (liberator.plugins.feedKey && liberator.plugins.feedKey.origMap.length >0) return;
+ this.helpstring = "";
if (this.isBinding) this.restoreKeyMap();
if (!this.isEnable) {
this.clearTabCache();
@@ -290,8 +296,11 @@ liberator.plugins.LocalKeyMode = (function(){
liberator.echoerr("localkeymode is disabled");
return;
}
- var arg = args.string ? args.string: args;
-
+ var arg = (typeof args.string == undefined? args: args.string);
+ if (!arg) {
+ liberator.echo(self.helpstring);
+ return;
+ }
self.releaseClosedTabCache();
self.deleteCurrentTabCache();
var tabId = getBrowser().selectedTab.linkedPanel;
@@ -315,7 +324,7 @@ liberator.plugins.LocalKeyMode = (function(){
commands.addUserCommand(["clearkeymaps","clearlocalkeymaps"], "Clear local key mapping",
function(){
self.clearTabCache();
- if (self.isBinding) self.loadKeyMap();
+ self.loadKeyMap();
}, {
});
},