File tree Expand file tree Collapse file tree 1 file changed +17
-16
lines changed
Expand file tree Collapse file tree 1 file changed +17
-16
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,23 @@ function this.pum_redraw()
5757 end
5858end
5959
60+ function this .get_path_cmp_items ()
61+ local typing_path = vim .fn [' easycomplete#sources#directory#TypingAPath' ]()
62+ -- 取根目录
63+ -- insert模式下为了避免和输入注释"//"频繁干扰,去掉了根目录的路径匹配
64+ -- 这里不存在这个频繁干扰的问题,再加回来
65+ if string.find (typing_path .prefx ," %s/$" ) ~= nil then
66+ typing_path .is_path = 1
67+ end
68+ if typing_path .is_path == 0 then
69+ return {}
70+ else
71+ local ret = vim .fn [' easycomplete#sources#directory#GetDirAndFiles' ](typing_path , typing_path .fname )
72+ return ret
73+ end
74+ end
75+
76+
6077function this .pum_close ()
6178 vim .fn [" easycomplete#pum#close" ]()
6279 vim .g .easycomplete_pum_noselect = pum_noselect
@@ -438,22 +455,6 @@ function this.do_path_complete()
438455 end , 10 )
439456end
440457
441- function this .get_path_cmp_items ()
442- local typing_path = vim .fn [' easycomplete#sources#directory#TypingAPath' ]()
443- -- 取根目录
444- -- insert模式下为了避免和输入注释"//"频繁干扰,去掉了根目录的路径匹配
445- -- 这里不存在这个频繁干扰的问题,再加回来
446- if string.find (typing_path .prefx ," %s/$" ) ~= nil then
447- typing_path .is_path = 1
448- end
449- if typing_path .is_path == 0 then
450- return {}
451- else
452- local ret = vim .fn [' easycomplete#sources#directory#GetDirAndFiles' ](typing_path , typing_path .fname )
453- return ret
454- end
455- end
456-
457458function this .get_complition_type (cmd_name )
458459 local cmd_type = " "
459460 for key , item in pairs (this .cmd_type ) do
You can’t perform that action at this time.
0 commit comments