File tree Expand file tree Collapse file tree 2 files changed +24
-24
lines changed
Expand file tree Collapse file tree 2 files changed +24
-24
lines changed Original file line number Diff line number Diff line change @@ -3,8 +3,6 @@ local console = util.console
33local normal_chars = " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRST0123456789#$_"
44-- cmdline_start_cmdpos 是不带偏移量的,偏移量只给 pum 定位用
55local cmdline_start_cmdpos = 0
6- local zizz_flag = 0
7- local zizz_timer = vim .loop .new_timer ()
86local completeopt = vim .o .completeopt
97local this = {}
108
5856
5957function this .select_next ()
6058 vim .fn [' easycomplete#pum#next' ]()
61- this .zizz ()
59+ util .zizz ()
6260 local new_whole_word = this .get_tab_returing_opword ()
6361 return new_whole_word
6462end
6563
6664function this .select_prev ()
6765 vim .fn [' easycomplete#pum#prev' ]()
68- this .zizz ()
66+ util .zizz ()
6967 local new_whole_word = this .get_tab_returing_opword ()
7068 return new_whole_word
7169end
@@ -153,7 +151,7 @@ function this.cmdline_handler(keys, key_str)
153151 if vim .g .easycomplete_cmdline_pattern == " " then
154152 return
155153 end
156- if this .zizzing () then return end
154+ if util .zizzing () then return end
157155 local cmdline = vim .fn .getcmdline ()
158156 cmdline_start_cmdpos = 0
159157 if string.byte (key_str ) == 9 then
@@ -266,25 +264,6 @@ function this.get_completion_type()
266264 return cmd_type
267265end
268266
269- function this .zizz ()
270- if zizz_flag > 0 then
271- zizz_timer :stop ()
272- zizz_flag = 0
273- end
274- zizz_timer :start (30 , 0 , function ()
275- zizz_flag = 0
276- end )
277- zizz_flag = 1
278- end
279-
280- function this .zizzing ()
281- if zizz_flag == 1 then
282- return true
283- else
284- return false
285- end
286- end
287-
288267this .commands_type = {
289268 -- File completion
290269 edit = ' file' ,
Original file line number Diff line number Diff line change 11local util = {}
2+ local zizz_flag = 0
3+ local zizz_timer = vim .loop .new_timer ()
24local async_timer = vim .loop .new_timer ()
35local async_timer_counter = 0
46
7+ function util .zizz ()
8+ if zizz_flag > 0 then
9+ zizz_timer :stop ()
10+ zizz_flag = 0
11+ end
12+ zizz_timer :start (30 , 0 , function ()
13+ zizz_flag = 0
14+ end )
15+ zizz_flag = 1
16+ end
17+
18+ function util .zizzing ()
19+ if zizz_flag == 1 then
20+ return true
21+ else
22+ return false
23+ end
24+ end
25+
526function util .get_servers ()
627 if not util .nvim_installer_installed () then
728 return nil
You can’t perform that action at this time.
0 commit comments