mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 17:20:04 +08:00
Fix lua bufsetlines api (#3639)
This commit is contained in:
parent
823d288b35
commit
f11c31eac7
@ -116,8 +116,6 @@ function! s:self.redraw_windows() abort
|
||||
return
|
||||
endif
|
||||
let self.notification_width = max(map(deepcopy(self.message), 'strwidth(v:val)'))
|
||||
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.__buffer.buf_set_lines(self.bufnr, 0 , -1, 0, self.message)
|
||||
let self.begin_row = 2
|
||||
for hashkey in keys(s:notifications)
|
||||
if hashkey !=# self.hashkey
|
||||
@ -170,6 +168,8 @@ function! s:self.redraw_windows() abort
|
||||
\ })
|
||||
let self.win_is_open = v:true
|
||||
endif
|
||||
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.__buffer.buf_set_lines(self.bufnr, 0 , -1, 0, self.message)
|
||||
endfunction
|
||||
|
||||
|
||||
|
@ -66,7 +66,7 @@ function! s:self.bufadd(name) abort
|
||||
elseif has('lua') && empty(a:name)
|
||||
let nr = float2nr(luaeval('vim.open().number'))
|
||||
call setbufvar(nr, '&buflisted', 0)
|
||||
return 0
|
||||
return nr
|
||||
elseif empty(a:name)
|
||||
" create an no-named buffer
|
||||
noautocmd 1new
|
||||
|
Loading…
Reference in New Issue
Block a user