| 1 |
From 63a1925fb56e5ac9bf28cffc270ea53c7b5c45af Mon Sep 17 00:00:00 2001 |
| 2 |
From: haya14busa <[email protected]> |
| 3 |
Date: Tue, 10 Dec 2013 00:13:28 +0900 |
| 4 |
Subject: [PATCH 19/36] Handle cmigemo path |
| 5 |
|
| 6 |
--- |
| 7 |
tools/migemo.vim | 17 ++++++++++++----- |
| 8 |
1 file changed, 12 insertions(+), 5 deletions(-) |
| 9 |
|
| 10 |
diff --git a/tools/migemo.vim b/tools/migemo.vim |
| 11 |
index a32d94b..1eecea1 100644 |
| 12 |
--- a/tools/migemo.vim |
| 13 |
+++ b/tools/migemo.vim |
| 14 |
@@ -5,7 +5,7 @@ |
| 15 |
" |
| 16 |
" Maintainer: MURAOKA Taro <[email protected]> |
| 17 |
" Modified: Yasuhiro Matsumoto <[email protected]> |
| 18 |
-" Last Change: 03-Mar-2006. |
| 19 |
+" Last Change: 09-Dec-2013. |
| 20 |
|
| 21 |
" Japanese Description: |
| 22 |
|
| 23 |
@@ -20,10 +20,14 @@ function! s:SearchDict2(name) |
| 24 |
let dict = globpath(path, a:name) |
| 25 |
endif |
| 26 |
if dict == '' |
| 27 |
- let dict = '/usr/local/share/migemo/'.a:name |
| 28 |
- if !filereadable(dict) |
| 29 |
- let dict = '' |
| 30 |
- endif |
| 31 |
+ for path in [ |
| 32 |
+ \ '/usr/local/share/'.a:name, |
| 33 |
+ \ '/usr/share/'.a:name, |
| 34 |
+ \ ] |
| 35 |
+ if filereadable(path) |
| 36 |
+ let dict = path |
| 37 |
+ endif |
| 38 |
+ endfor |
| 39 |
endif |
| 40 |
let dict = matchstr(dict, "^[^\<NL>]*") |
| 41 |
return dict |
| 42 |
@@ -31,6 +35,9 @@ endfunction |
| 43 |
|
| 44 |
function! s:SearchDict() |
| 45 |
let dict = '' |
| 46 |
+ if dict == '' |
| 47 |
+ let dict = s:SearchDict2('cmigemo/'.&encoding.'/migemo-dict') |
| 48 |
+ endif |
| 49 |
if dict == '' |
| 50 |
let dict = s:SearchDict2('migemo/'.&encoding.'/migemo-dict') |
| 51 |
endif |
| 52 |
-- |
| 53 |
2.39.2 |
| 54 |
|