From ef386352b0d73cebb7598a61c140fac29bf53a22 Mon Sep 17 00:00:00 2001 From: Kyohei Morihiro Date: Thu, 6 Apr 2017 13:49:48 +0900 Subject: [PATCH 1/2] Fix to use migemodict for +migemo --- autoload/EasyMotion/cmigemo.vim | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/autoload/EasyMotion/cmigemo.vim b/autoload/EasyMotion/cmigemo.vim index 7c84e19..898f4c4 100644 --- a/autoload/EasyMotion/cmigemo.vim +++ b/autoload/EasyMotion/cmigemo.vim @@ -92,7 +92,13 @@ function! EasyMotion#cmigemo#getMigemoPattern(input) "{{{ if has('migemo') " Use migemo(). - return migemo(a:input) + let save_migemo_dict = &migemodict + let &migemodict = s:migemodict + try + return migemo(a:input) + finally + let &migemodict = save_migemo_dict + endtry elseif executable('cmigemo') " Use cmigemo. return EasyMotion#cmigemo#system('cmigemo -v -w "'.a:input.'" -d "'.s:migemodict.'"') From bd03c22f7528cd45e919223ff6e2c1469da26284 Mon Sep 17 00:00:00 2001 From: Kyohei Morihiro Date: Tue, 11 Apr 2017 12:40:42 +0900 Subject: [PATCH 2/2] Fix to use current &migemodict value if it exists --- autoload/EasyMotion/cmigemo.vim | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/autoload/EasyMotion/cmigemo.vim b/autoload/EasyMotion/cmigemo.vim index 898f4c4..9a53361 100644 --- a/autoload/EasyMotion/cmigemo.vim +++ b/autoload/EasyMotion/cmigemo.vim @@ -92,12 +92,14 @@ function! EasyMotion#cmigemo#getMigemoPattern(input) "{{{ if has('migemo') " Use migemo(). - let save_migemo_dict = &migemodict + if &migemodict !=# '' + return migemo(a:input) + endif let &migemodict = s:migemodict try return migemo(a:input) finally - let &migemodict = save_migemo_dict + let &migemodict = '' endtry elseif executable('cmigemo') " Use cmigemo.