code: def append_to_history(self, filename, command, go_to_eof):
          
          if not is_text_string(filename): # filename is a QString
              filename = to_text_string(filename.toUtf8(), 'utf-8')
          command = to_text_string(command)
          index = self.filenames.index(filename)
          self.editors[index].append(command)
          if go_to_eof:
              self.editors[index].set_cursor_position('eof')
          self.tabwidget.setCurrentIndex(index)
docs: Append an entry to history filename.
  
          Args:
              filename (str): file to be updated in a new tab.
              command (str): line to be added.
              go_to_eof (bool): scroll to the end of file.