osyo-manga / vital-over

18 stars 3 forks source link

Modules/KeyMapping: add default value #88

Closed haya14busa closed 10 years ago

haya14busa commented 10 years ago
call vital#of("vital").unload()
let s:V = vital#of("vital")
let s:Cmdline = s:V.import("Over.Commandline")
let s:modules = s:V.import('Over.Commandline.Modules')

let cmdline = s:Cmdline.make_standard()
call cmdline._init_variables()
call cmdline.connect(s:modules.get('KeyMapping').make_vim_cmdline_mapping())
call cmdline.cnoremap("h", "ho\<Esc>mu")
call cmdline._input("h")
echo cmdline.getline() == "ho"
echo cmdline.input_key_stack_string() == "mu"

こういう感じでテストするときとか, なんらかの形で on_enter 呼ばれる前に keymapping() 呼ばれると変数なくて落ちるので修正です

osyo-manga commented 10 years ago

ありがとうございます。

haya14busa commented 10 years ago

対応ありがとうございます!