aboutsummaryrefslogtreecommitdiffstats
path: root/ubiquity.js
diff options
context:
space:
mode:
authoranekos2010-12-19 07:37:22 +0900
committeranekos2010-12-19 08:50:59 +0900
commitbf3d8dd9f655503d53f698f7957f3627d8215ecb (patch)
treeb644e0d9d86e1ac9742e10af94c2dff935e0b2a4 /ubiquity.js
parent236ae6130d6a78d4cc8a5349316a3ab0c085a6b9 (diff)
downloadvimperator-plugins-bf3d8dd9f655503d53f698f7957f3627d8215ecb.tar.bz2
@おかしいでなおしたで
Diffstat (limited to 'ubiquity.js')
0 files changed, 0 insertions, 0 deletions
A mode from INSERT mode and "noinsertmode" is set. * * ex). * :let g:ex_ime_mode = "inactive" * :let g:textarea_ime_mode = "inactive" * * following values are available: * "auto" : No change * "active" : Initially IME on * "inactive" : Initially IME off * "disabled" : Disable IME * * more details: see http://developer.mozilla.org/en/docs/CSS:ime-mode * * if these values are null, "inactive" is used * */ liberator.plugins.imeController = (function(){ var inputElement = document.getAnonymousElementByAttribute( document.getElementById('liberator-commandline-command'),'anonid','input' ); function getMode(name){ return liberator.globalVariables[name] ? liberator.globalVariables[name] : 'inactive'; } function preExec(target,name,func){ var original = target[name]; target[name] = function(){ func.apply(this,arguments); return original.apply(target,arguments); } } preExec(commandline,'open',function(){ liberator.plugins.imeController.set(inputElement, getMode('ex_ime_mode')); }); preExec(events,'onEscape',function(){ if (liberator.mode == modes.INSERT && (modes.extended & modes.TEXTAREA) && !options.insertmode){ var inputField = buffer.lastInputField; if (liberator.plugins.imeController.set(inputField, getMode('textarea_ime_mode'))){ inputField.blur(); setTimeout(function(){inputField.focus();},0); } } }); return { set: function(elem, mode){ if (elem && mode) return elem.style.imeMode = mode; return false; }, reset: function(){ delete liberator.globalVariables.ex_ime_mode; delete liberator.globalVariables.textarea_ime_mode; } }; })(); // vim: sw=4 ts=4 et: