| 1 |
From d12c55432fec504ceeafd77ea323ba9de634ad0d Mon Sep 17 00:00:00 2001 |
| 2 |
From: haya14busa <[email protected]> |
| 3 |
Date: Wed, 11 Dec 2013 13:56:58 +0900 |
| 4 |
Subject: [PATCH 21/36] Improve searching migemo dict path |
| 5 |
|
| 6 |
Fix: Some slashes are missing |
| 7 |
Change: Order of searching path list and improve some code |
| 8 |
--- |
| 9 |
tools/migemo.vim | 13 ++++++------- |
| 10 |
1 file changed, 6 insertions(+), 7 deletions(-) |
| 11 |
|
| 12 |
diff --git a/tools/migemo.vim b/tools/migemo.vim |
| 13 |
index 3a7ff39..62e09d9 100644 |
| 14 |
--- a/tools/migemo.vim |
| 15 |
+++ b/tools/migemo.vim |
| 16 |
@@ -21,11 +21,13 @@ function! s:SearchDict2(name) |
| 17 |
endif |
| 18 |
if dict == '' |
| 19 |
for path in [ |
| 20 |
- \ '/usr/local/share/'.a:name, |
| 21 |
- \ '/usr/share/'.a:name, |
| 22 |
- \ '/usr/local/share/migemo'.a:name, |
| 23 |
- \ '/usr/share/cmigemo'.a:name, |
| 24 |
+ \ '/usr/local/share/migemo/', |
| 25 |
+ \ '/usr/local/share/cmigemo/', |
| 26 |
+ \ '/usr/local/share/', |
| 27 |
+ \ '/usr/share/cmigemo/', |
| 28 |
+ \ '/usr/share/', |
| 29 |
\ ] |
| 30 |
+ let path = path . a:name |
| 31 |
if filereadable(path) |
| 32 |
let dict = path |
| 33 |
break |
| 34 |
@@ -38,9 +40,6 @@ endfunction |
| 35 |
|
| 36 |
function! s:SearchDict() |
| 37 |
let dict = '' |
| 38 |
- if dict == '' |
| 39 |
- let dict = s:SearchDict2('cmigemo/'.&encoding.'/migemo-dict') |
| 40 |
- endif |
| 41 |
if dict == '' |
| 42 |
let dict = s:SearchDict2('migemo/'.&encoding.'/migemo-dict') |
| 43 |
endif |
| 44 |
-- |
| 45 |
2.39.2 |
| 46 |
|