def _update_displayed_texts(self) -> None:
    candidates_len = len(self._candidates)
    if ((not self._is_async) and self._context['auto_resize']):
        winminheight = int(self._context['winminheight'])
        max_height = min(int(self._context['winheight']), self._get_max_height())
        if ((winminheight != (- 1)) and (candidates_len < winminheight)):
            self._winheight = winminheight
        elif (candidates_len > max_height):
            self._winheight = max_height
        elif (candidates_len != self._winheight):
            self._winheight = candidates_len
    max_source_name_len = 0
    if self._candidates:
        max_source_name_len = max([len(self._get_display_source_name(x['source_name'])) for x in self._candidates])
    self._context['max_source_name_len'] = max_source_name_len
    self._context['max_source_name_format'] = (('{:<' + str(self._context['max_source_name_len'])) + '}')
    self._displayed_texts = [self._get_candidate_display_text(i) for i in range(0, candidates_len)]
def _update_displayed_texts(self) -> None:
    candidates_len = len(self._candidates)
    if ((not self._is_async) and self._context['auto_resize']):
        winminheight = int(self._context['winminheight'])
        max_height = min(int(self._context['winheight']), self._get_max_height())
        if ((winminheight != (- 1)) and (candidates_len < winminheight)):
            self._winheight = winminheight
        elif (candidates_len > max_height):
            self._winheight = max_height
        elif (candidates_len != self._winheight):
            self._winheight = candidates_len
    max_source_name_len = 0
    if self._candidates:
        max_source_name_len = max([len(self._get_display_source_name(x['source_name'])) for x in self._candidates])
    self._context['max_source_name_len'] = max_source_name_len
    self._context['max_source_name_format'] = (('{:<' + str(self._context['max_source_name_len'])) + '}')
    self._displayed_texts = [self._get_candidate_display_text(i) for i in range(0, candidates_len)]