File: 0020-Improve-searching-migemo-dict-path.patch

package info (click to toggle)
cmigemo 1%3A1.2%2Bgh0.20140306-4
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,668 kB
  • ctags: 1,550
  • sloc: ansic: 2,617; lisp: 656; cs: 188; makefile: 174; sh: 172; cpp: 67; perl: 59; csh: 49
file content (42 lines) | stat: -rw-r--r-- 1,262 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
From: haya14busa <hayabusa1419@gmail.com>
Date: Wed, 11 Dec 2013 13:56:58 +0900
Subject: Improve searching migemo dict path

Fix: Some slashes are missing
Change: Order of searching path list and improve some code
---
 tools/migemo.vim | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/tools/migemo.vim b/tools/migemo.vim
index 3a7ff39..62e09d9 100644
--- a/tools/migemo.vim
+++ b/tools/migemo.vim
@@ -21,11 +21,13 @@ function! s:SearchDict2(name)
   endif
   if dict == ''
     for path in [
-          \ '/usr/local/share/'.a:name,
-          \ '/usr/share/'.a:name,
-          \ '/usr/local/share/migemo'.a:name,
-          \ '/usr/share/cmigemo'.a:name,
+          \ '/usr/local/share/migemo/',
+          \ '/usr/local/share/cmigemo/',
+          \ '/usr/local/share/',
+          \ '/usr/share/cmigemo/',
+          \ '/usr/share/',
           \ ]
+      let path = path . a:name
       if filereadable(path)
         let dict = path
         break
@@ -39,9 +41,6 @@ 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
   if dict == ''