1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-02 20:30:05 +08:00

perf(notify): change notify step timer

This commit is contained in:
wsdjeg 2022-10-23 21:22:18 +08:00
parent 6cc0fc6486
commit 1629ba4c92

View File

@ -100,11 +100,11 @@ endfunction
function! s:self.increase_window(...) abort
" let self.notification_width = self.__floating.get_width(self.winid)
if self.notification_width <= self.notify_max_width && self.win_is_open()
let self.notification_width += min([float2nr((self.notify_max_width - self.notification_width) * 1 / 10), float2nr(self.notify_max_width)])
let self.notification_width += min([float2nr((self.notify_max_width - self.notification_width) * 1 / 20), float2nr(self.notify_max_width)])
call self.__buffer.buf_set_lines(self.border.bufnr, 0 , -1, 0,
\ self.draw_border(self.title, self.notification_width, len(self.message)))
call self.redraw_windows()
call timer_start(30, self.increase_window, {'repeat' : 1})
call timer_start(10, self.increase_window, {'repeat' : 1})
endif
endfunction