fix copying collapsed lines to the clipboard