mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 22:40:04 +08:00
Fix notify scratch buffer (#4358)
This commit is contained in:
parent
dd46a88bd0
commit
eb1d0780a0
@ -113,23 +113,23 @@ function! s:self.notify(msg, ...) abort
|
||||
call add(self.message, a:msg)
|
||||
let self.notification_color = get(a:000, 0, 'Normal')
|
||||
if !bufexists(self.border.bufnr)
|
||||
let self.border.bufnr = self.__buffer.create_buf(0, 0)
|
||||
let self.border.bufnr = self.__buffer.create_buf(0, 1)
|
||||
endif
|
||||
if !bufexists(self.bufnr)
|
||||
let self.bufnr = self.__buffer.create_buf(0, 0)
|
||||
let self.bufnr = self.__buffer.create_buf(0, 1)
|
||||
endif
|
||||
if empty(self.hashkey)
|
||||
let self.hashkey = self.__password.generate_simple(10)
|
||||
endif
|
||||
call self.redraw_windows()
|
||||
call setbufvar(self.bufnr, '&number', 0)
|
||||
call setbufvar(self.bufnr, '&cursorline', 0)
|
||||
call setbufvar(self.bufnr, '&relativenumber', 0)
|
||||
call setbufvar(self.bufnr, '&buftype', 'nofile')
|
||||
call setbufvar(self.bufnr, '&cursorline', 0)
|
||||
call setbufvar(self.bufnr, '&bufhidden', 'wipe')
|
||||
call setbufvar(self.border.bufnr, '&number', 0)
|
||||
call setbufvar(self.border.bufnr, '&relativenumber', 0)
|
||||
call setbufvar(self.border.bufnr, '&buftype', 'nofile')
|
||||
call setbufvar(self.border.bufnr, '&cursorline', 0)
|
||||
call setbufvar(self.border.bufnr, '&bufhidden', 'wipe')
|
||||
call extend(s:notifications, {self.hashkey : self})
|
||||
call self.increase_window()
|
||||
call timer_start(self.timeout, self.close, {'repeat' : 1})
|
||||
|
Loading…
Reference in New Issue
Block a user