'Render all segments.'

def render(self, window=None, window_id=None, winnr=None, is_tabline=False):

    segment_info = self.segment_info.copy()
    if (window is vim.current.window):
        mode = vim_mode()
        mode = mode_translations.get(mode, mode)
    else:
        mode = u'nc'
    segment_info.update(window=window, mode=mode, window_id=window_id, winnr=winnr, buffer=window.buffer, tabpage=current_tabpage(), encoding=self.encoding)
    segment_info[u'tabnr'] = segment_info[u'tabpage'].number
    segment_info[u'bufnr'] = segment_info[u'buffer'].number
    if is_tabline:
        winwidth = int(vim_getoption(u'columns'))
    else:
        winwidth = segment_info[u'window'].width
    statusline = super(VimRenderer, self).render(mode=mode, width=winwidth, segment_info=segment_info, matcher_info=(None if is_tabline else segment_info))
    statusline = statusline.encode(self.encoding, self.strwidth_error_name)
    return statusline
