def _init_buffer(self) -> None:
    self._prev_status = dict()
    self._displayed_texts = []
    self._prev_bufnr = self._vim.current.buffer.number
    self._prev_curpos = self._vim.call('getcurpos')
    self._prev_wininfo = self._get_wininfo()
    self._prev_winid = int(self._context['prev_winid'])
    self._winrestcmd = self._vim.call('winrestcmd')
    self._ruler = self._vim.options['ruler']
    self._switch_buffer()
    self._bufnr = self._vim.current.buffer.number
    self._winid = self._vim.call('win_getid')
    self._resize_buffer(True)
    self._winheight = self._vim.current.window.height
    self._winwidth = self._vim.current.window.width
    self._bufvars = self._vim.current.buffer.vars
    self._bufvars['denite'] = {'buffer_name': self._context['buffer_name']}
    self._bufvars['denite_statusline'] = {}
    self._vim.vars['denite#_previewed_buffers'] = {}
    self._save_window_options = {}
    window_options = {'colorcolumn', 'concealcursor', 'conceallevel', 'cursorcolumn', 'cursorline', 'foldcolumn', 'foldenable', 'list', 'number', 'relativenumber', 'signcolumn', 'spell', 'winfixheight', 'wrap'}
    for k in window_options:
        self._save_window_options[k] = self._vim.current.window.options[k]
    self._vim.command('setlocal colorcolumn=')
    self._vim.command('setlocal conceallevel=3')
    self._vim.command('setlocal concealcursor=inv')
    self._vim.command('setlocal nocursorcolumn')
    self._vim.command('setlocal nofoldenable')
    self._vim.command('setlocal foldcolumn=0')
    self._vim.command('setlocal nolist')
    self._vim.command('setlocal nonumber')
    self._vim.command('setlocal norelativenumber')
    self._vim.command('setlocal nospell')
    self._vim.command('setlocal winfixheight')
    self._vim.command('setlocal nowrap')
    self._vim.command('setlocal signcolumn=no')
    if self._context['cursorline']:
        self._vim.command('setlocal cursorline')
    options = self._vim.current.buffer.options
    if self._floating:
        self._vim.options['ruler'] = False
    options['buftype'] = 'nofile'
    options['bufhidden'] = 'delete'
    options['swapfile'] = False
    options['buflisted'] = False
    options['modeline'] = False
    options['modifiable'] = False
    options['filetype'] = 'denite'
    if self._vim.call('exists', '#WinEnter'):
        self._vim.command('doautocmd WinEnter')
    if self._vim.call('exists', '#BufWinEnter'):
        self._vim.command('doautocmd BufWinEnter')
    if (not self._vim.call('has', 'nvim')):
        self._vim.command('silent doautocmd FileType denite')
    if self._context['auto_action']:
        self._vim.command('autocmd denite CursorMoved <buffer> call denite#call_map("auto_action")')
    self._init_syntax()
def _init_buffer(self) -> None:
    self._prev_status = dict()
    self._displayed_texts = []
    self._prev_bufnr = self._vim.current.buffer.number
    self._prev_curpos = self._vim.call('getcurpos')
    self._prev_wininfo = self._get_wininfo()
    self._prev_winid = int(self._context['prev_winid'])
    self._winrestcmd = self._vim.call('winrestcmd')
    self._ruler = self._vim.options['ruler']
    self._switch_buffer()
    self._bufnr = self._vim.current.buffer.number
    self._winid = self._vim.call('win_getid')
    self._resize_buffer(True)
    self._winheight = self._vim.current.window.height
    self._winwidth = self._vim.current.window.width
    self._bufvars = self._vim.current.buffer.vars
    self._bufvars['denite'] = {'buffer_name': self._context['buffer_name']}
    self._bufvars['denite_statusline'] = {}
    self._vim.vars['denite#_previewed_buffers'] = {}
    self._save_window_options = {}
    window_options = {'colorcolumn', 'concealcursor', 'conceallevel', 'cursorcolumn', 'cursorline', 'foldcolumn', 'foldenable', 'list', 'number', 'relativenumber', 'signcolumn', 'spell', 'winfixheight', 'wrap'}
    for k in window_options:
        self._save_window_options[k] = self._vim.current.window.options[k]
    self._vim.command('setlocal colorcolumn=')
    self._vim.command('setlocal conceallevel=3')
    self._vim.command('setlocal concealcursor=inv')
    self._vim.command('setlocal nocursorcolumn')
    self._vim.command('setlocal nofoldenable')
    self._vim.command('setlocal foldcolumn=0')
    self._vim.command('setlocal nolist')
    self._vim.command('setlocal nonumber')
    self._vim.command('setlocal norelativenumber')
    self._vim.command('setlocal nospell')
    self._vim.command('setlocal winfixheight')
    self._vim.command('setlocal nowrap')
    self._vim.command('setlocal signcolumn=no')
    if self._context['cursorline']:
        self._vim.command('setlocal cursorline')
    options = self._vim.current.buffer.options
    if self._floating:
        self._vim.options['ruler'] = False
    options['buftype'] = 'nofile'
    options['bufhidden'] = 'delete'
    options['swapfile'] = False
    options['buflisted'] = False
    options['modeline'] = False
    options['modifiable'] = False
    options['filetype'] = 'denite'
    if self._vim.call('exists', '#WinEnter'):
        self._vim.command('doautocmd WinEnter')
    if self._vim.call('exists', '#BufWinEnter'):
        self._vim.command('doautocmd BufWinEnter')
    if (not self._vim.call('has', 'nvim')):
        self._vim.command('silent doautocmd FileType denite')
    if self._context['auto_action']:
        self._vim.command('autocmd denite CursorMoved <buffer> call denite#call_map("auto_action")')
    self._init_syntax()