def do_action(self, action_name: str, command: str='', is_manual: bool=False) -> None:
    if is_manual:
        candidates = self._get_selected_candidates()
    elif self._get_cursor_candidate():
        candidates = [self._get_cursor_candidate()]
    else:
        candidates = []
    if ((not self._denite) or (not candidates) or (not action_name)):
        return
    self._prev_action = action_name
    action = self._denite.get_action(self._context, action_name, candidates)
    if (not action):
        return
    post_action = self._context['post_action']
    is_quit = (action['is_quit'] or (post_action == 'quit'))
    if is_quit:
        self.quit()
    self._denite.do_action(self._context, action_name, candidates)
    self._result = candidates
    if (command != ''):
        self._vim.command(command)
    if (is_quit and (post_action == 'open')):
        prev_cursor = self._cursor
        cursor_candidate = self._get_cursor_candidate()
        self._init_buffer()
        self.redraw(False)
        if (cursor_candidate == self._get_candidate(prev_cursor)):
            self._move_to_pos(prev_cursor)
        is_quit = False
    if ((not is_quit) and is_manual):
        self._selected_candidates = []
        self.redraw(action['is_redraw'])
    if (is_manual and self._context['sources_queue']):
        self._context['input'] = ''
        self._context['quick_move'] = ''
        self._start_sources_queue(self._context)
    return
def do_action(self, action_name: str, command: str=, is_manual: bool=False) -> None:
    if is_manual:
        candidates = self._get_selected_candidates()
    elif self._get_cursor_candidate():
        candidates = [self._get_cursor_candidate()]
    else:
        candidates = []
    if ((not self._denite) or (not candidates) or (not action_name)):
        return
    self._prev_action = action_name
    action = self._denite.get_action(self._context, action_name, candidates)
    if (not action):
        return
    post_action = self._context['post_action']
    is_quit = (action['is_quit'] or (post_action == 'quit'))
    if is_quit:
        self.quit()
    self._denite.do_action(self._context, action_name, candidates)
    self._result = candidates
    if (command != ):
        self._vim.command(command)
    if (is_quit and (post_action == 'open')):
        prev_cursor = self._cursor
        cursor_candidate = self._get_cursor_candidate()
        self._init_buffer()
        self.redraw(False)
        if (cursor_candidate == self._get_candidate(prev_cursor)):
            self._move_to_pos(prev_cursor)
        is_quit = False
    if ((not is_quit) and is_manual):
        self._selected_candidates = []
        self.redraw(action['is_redraw'])
    if (is_manual and self._context['sources_queue']):
        self._context['input'] = 
        self._context['quick_move'] = 
        self._start_sources_queue(self._context)
    return