From 63a1925fb56e5ac9bf28cffc270ea53c7b5c45af Mon Sep 17 00:00:00 2001 From: haya14busa Date: Tue, 10 Dec 2013 00:13:28 +0900 Subject: [PATCH 19/36] Handle cmigemo path --- tools/migemo.vim | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/tools/migemo.vim b/tools/migemo.vim index a32d94b..1eecea1 100644 --- a/tools/migemo.vim +++ b/tools/migemo.vim @@ -5,7 +5,7 @@ " " Maintainer: MURAOKA Taro " Modified: Yasuhiro Matsumoto -" Last Change: 03-Mar-2006. +" Last Change: 09-Dec-2013. " Japanese Description: @@ -20,10 +20,14 @@ function! s:SearchDict2(name) let dict = globpath(path, a:name) endif if dict == '' - let dict = '/usr/local/share/migemo/'.a:name - if !filereadable(dict) - let dict = '' - endif + for path in [ + \ '/usr/local/share/'.a:name, + \ '/usr/share/'.a:name, + \ ] + if filereadable(path) + let dict = path + endif + endfor endif let dict = matchstr(dict, "^[^\]*") return dict @@ -31,6 +35,9 @@ endfunction function! s:SearchDict() let dict = '' + if dict == '' + let dict = s:SearchDict2('cmigemo/'.&encoding.'/migemo-dict') + endif if dict == '' let dict = s:SearchDict2('migemo/'.&encoding.'/migemo-dict') endif -- 2.39.2