code: def _do_select(self, start_bindex, end_bindex):
          
          self.select(QItemSelection(), QItemSelectionModel.Clear)
          if start_bindex > end_bindex:
              start_bindex, end_bindex = end_bindex, start_bindex
  
          selection = QItemSelection()
          if row_number(end_bindex) - row_number(start_bindex) == 0:
              # all on one line
              self._bselect(selection, start_bindex, end_bindex)
          elif row_number(end_bindex) - row_number(start_bindex) == 1:
              # two lines
              self._bselect(selection, start_bindex, row_end_index(start_bindex))
              self._bselect(selection, row_start_index(end_bindex), end_bindex)
          else:
              # many lines
              self._bselect(selection, start_bindex, row_end_index(start_bindex))
              self._bselect(selection, row_start_index(start_bindex) + 0x10, row_end_index(end_bindex) - 0x10)
              self._bselect(selection, row_start_index(end_bindex), end_bindex)
  
          self.select(selection, QItemSelectionModel.SelectCurrent)
          self.start = start_bindex
          self.end = end_bindex
          self.selectionRangeChanged.emit(end_bindex)
docs: select the given range by buffer indices
  
          selects items like this:
  
              ..................
              ......xxxxxxxxxxxx
              xxxxxxxxxxxxxxxxxx
              xxxxxxxxxxxxxxxxxx
              xxxxxxxxxxxx......
              ..................
  
          *not* like this:
  
              ..................
              ......xxxxxx......
              ......xxxxxx......
              ......xxxxxx......
              ......xxxxxx......
              ..................