@@ -95,6 +95,9 @@ function! s:GetWrappedFileAndDirsList(rlist, fpath, base)
9595 return []
9696 endif
9797
98+ let dir_menu = g: easycomplete_menu_abbr ? ' [Dir]' : ' folder'
99+ let file_menu = g: easycomplete_menu_abbr ? ' [File]' : ' file'
100+
98101 if a: base [-1 :] == " ."
99102 let l: pfx = a: base
100103 else
@@ -106,17 +109,17 @@ function! s:GetWrappedFileAndDirsList(rlist, fpath, base)
106109 let localfile = simplify (a: fpath . ' /' . item)
107110 if isdirectory (localfile)
108111 if g: easycomplete_nerd_font == 0
109- call add (result_with_kind, {" word" : item[strwidth (l: pfx ):] . " /" , " abbr" :item, " menu" : " [Dir] " })
112+ call add (result_with_kind, {" word" : item[strwidth (l: pfx ):] . " /" , " abbr" :item, " menu" : dir_menu })
110113 else
111114 call add (result_with_kind, {" word" : item[strwidth (l: pfx ):] . " /" , " abbr" :item,
112- \ " menu" : " folder " , " kind" : " " })
115+ \ " menu" : dir_menu , " kind" : " " })
113116 endif
114117 else
115118 if g: easycomplete_nerd_font == 0
116- call add (result_with_kind, {" word" : item[strwidth (l: pfx ):], " abbr" :item," menu" : " [File] " })
119+ call add (result_with_kind, {" word" : item[strwidth (l: pfx ):], " abbr" :item," menu" : file_menu })
117120 else
118121 call add (result_with_kind, {" word" : item[strwidth (l: pfx ):], " abbr" : item,
119- \ " menu" : " [file] " ,
122+ \ " menu" : file_menu ,
120123 \ " kind" : " "
121124 \ })
122125 endif
0 commit comments