Skip to content

Commit 13b0e8e

Browse files
committed
bugfix for #382
1 parent 6a7804e commit 13b0e8e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

autoload/easycomplete/pum.vim

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,11 +247,16 @@ function! easycomplete#pum#WinScrolled()
247247
let cursor_left = s:CursorLeft()
248248
let typing_word = easycomplete#util#GetTypingWord()
249249
let new_startcol = getcurpos()[2] - strlen(typing_word)
250+
let new_startcol = s:original_ctx["startcol"]
250251
let lines = getbufline(s:pum_buffer, 1, "$")
251252
let buffer_size = s:GetBufSize(lines)
252253
let pum_pos = s:ComputePumPos(new_startcol, buffer_size)
253254
let opts = deepcopy(s:default_pum_pot)
254255
call extend(opts, pum_pos)
256+
if new_startcol - v:event[bufwinid(bufnr(""))].leftcol <= 1
257+
let new_startcol = 1
258+
call timer_start(10, { -> s:RenderScroll() })
259+
endif
255260
call nvim_win_set_config(s:pum_window, opts)
256261
let curr_item = easycomplete#pum#CursoredItem()
257262
if !empty(curr_item)

0 commit comments

Comments
 (0)