def _resize_buffer(self, is_current_buffer: bool) -> None:
    split = self._context['split']
    if ((split == 'no') or (split == 'tab') or (self._vim.call('winnr', '$') == 1)):
        return
    winheight = max(self._winheight, 1)
    winwidth = max(self._winwidth, 1)
    is_vertical = (split == 'vertical')
    if (not is_current_buffer):
        restore = self._vim.call('win_getid')
        self._vim.call('win_gotoid', self._winid)
    if ((not is_vertical) and (self._vim.current.window.height != winheight)):
        if self._floating:
            wincol = int(self._context['winrow'])
            row = wincol
            if (split == 'floating'):
                if (self._context['auto_resize'] and (row > 1)):
                    row += int(self._context['winheight'])
                    row -= self._winheight
                self._vim.call('nvim_win_set_config', self._winid, {'relative': 'editor', 'row': row, 'col': int(self._context['wincol']), 'width': winwidth, 'height': winheight})
                filter_row = (0 if (wincol == 1) else (row + winheight))
                filter_col = int(self._context['wincol'])
            elif (split == 'floating_relative'):
                init_pos = self._vim.call('nvim_win_get_config', self._winid)
                self._vim.call('nvim_win_set_config', self._winid, {'relative': 'win', 'win': init_pos['win'], 'row': init_pos['row'], 'col': init_pos['col'], 'width': winwidth, 'height': winheight})
                filter_col = init_pos['col']
                if (init_pos['anchor'] == 'NW'):
                    winpos = self._vim.call('nvim_win_get_position', self._winid)
                    filter_row = (winpos[0] + winheight)
            filter_winid = self._vim.vars['denite#_filter_winid']
            self._context['filter_winrow'] = row
            if (self._vim.call('win_id2win', filter_winid) > 0):
                self._vim.call('nvim_win_set_config', filter_winid, {'relative': 'editor', 'row': filter_row, 'col': filter_col})
        self._vim.command(('resize ' + str(winheight)))
        if self._context['reversed']:
            self._vim.command('normal! zb')
    elif (is_vertical and (self._vim.current.window.width != winwidth)):
        self._vim.command(('vertical resize ' + str(winwidth)))
    if (not is_current_buffer):
        self._vim.call('win_gotoid', restore)
def _resize_buffer(self, is_current_buffer: bool) -> None:
    split = self._context['split']
    if ((split == 'no') or (split == 'tab') or (self._vim.call('winnr', '$') == 1)):
        return
    winheight = max(self._winheight, 1)
    winwidth = max(self._winwidth, 1)
    is_vertical = (split == 'vertical')
    if (not is_current_buffer):
        restore = self._vim.call('win_getid')
        self._vim.call('win_gotoid', self._winid)
    if ((not is_vertical) and (self._vim.current.window.height != winheight)):
        if self._floating:
            wincol = int(self._context['winrow'])
            row = wincol
            if (split == 'floating'):
                if (self._context['auto_resize'] and (row > 1)):
                    row += int(self._context['winheight'])
                    row -= self._winheight
                self._vim.call('nvim_win_set_config', self._winid, {'relative': 'editor', 'row': row, 'col': int(self._context['wincol']), 'width': winwidth, 'height': winheight})
                filter_row = (0 if (wincol == 1) else (row + winheight))
                filter_col = int(self._context['wincol'])
            elif (split == 'floating_relative'):
                init_pos = self._vim.call('nvim_win_get_config', self._winid)
                self._vim.call('nvim_win_set_config', self._winid, {'relative': 'win', 'win': init_pos['win'], 'row': init_pos['row'], 'col': init_pos['col'], 'width': winwidth, 'height': winheight})
                filter_col = init_pos['col']
                if (init_pos['anchor'] == 'NW'):
                    winpos = self._vim.call('nvim_win_get_position', self._winid)
                    filter_row = (winpos[0] + winheight)
            filter_winid = self._vim.vars['denite#_filter_winid']
            self._context['filter_winrow'] = row
            if (self._vim.call('win_id2win', filter_winid) > 0):
                self._vim.call('nvim_win_set_config', filter_winid, {'relative': 'editor', 'row': filter_row, 'col': filter_col})
        self._vim.command(('resize ' + str(winheight)))
        if self._context['reversed']:
            self._vim.command('normal! zb')
    elif (is_vertical and (self._vim.current.window.width != winwidth)):
        self._vim.command(('vertical resize ' + str(winwidth)))
    if (not is_current_buffer):
        self._vim.call('win_gotoid', restore)