Drag and drop editing should be smarter
Posted: Fri May 09, 2003 3:44 pm
Document classes have a preference called "Include trailing spaces when selecting words". I suspect the motivation for turning on this preference is so that cut-and-paste operations relieve the user of the hassle of dealing with removing spaces from the area where words are being cut, and inserting spaces where words are being pasted. Unfortunately this setting isn't sufficient.
There are a couple of problems:
- when the words are pasted the user must ensure that the insertion point is after any spaces, otherwise the trailing spaces that were included will be multiplied;
- if the words being cut do not have trailing spaces, but instead some other terminator (a period, comma, semi-colon, etc.) then the user will prefer that leading spaces be included in the selection.
What TextPad should do is implement Smart word editing. This means that for both drag & drop editing and cut & paste editing TextPad would automatically fix spaces in the source and destination regions:
- trailing spaces would be removed from the source region; if there are no trailing spaces then leading spaces would be removed;
- a space would be inserted at the destination region; if the newly inserted words did not have a space before them, the space would be a leading one; if leading spaces already existed then it'd be inserted as a trailing one.
Smart word editing would be a document class preference that would replace the current "Include trailing spaces when selecting words" preference.
(Microsoft Word does even smarter word editing than what's described above, but a text editor such as TextPad should at least implement the above.)
There are a couple of problems:
- when the words are pasted the user must ensure that the insertion point is after any spaces, otherwise the trailing spaces that were included will be multiplied;
- if the words being cut do not have trailing spaces, but instead some other terminator (a period, comma, semi-colon, etc.) then the user will prefer that leading spaces be included in the selection.
What TextPad should do is implement Smart word editing. This means that for both drag & drop editing and cut & paste editing TextPad would automatically fix spaces in the source and destination regions:
- trailing spaces would be removed from the source region; if there are no trailing spaces then leading spaces would be removed;
- a space would be inserted at the destination region; if the newly inserted words did not have a space before them, the space would be a leading one; if leading spaces already existed then it'd be inserted as a trailing one.
Smart word editing would be a document class preference that would replace the current "Include trailing spaces when selecting words" preference.
(Microsoft Word does even smarter word editing than what's described above, but a text editor such as TextPad should at least implement the above.)