I have a screenshot now showing the text selection routine has a bug.
This is the end of a large chunk of selected text. I had placed the cursor at the start of a line many lines back, then dragged down to select all text to the end of the file. Then I backed up the mouse two lines, and this left the end of the last line still selected. Deleting the selection didn't remove this last bit of highlighted text, but that indicates a likely source of the other cut/paste errors I have been having, in displaying the initial selections.