On Aug 17, 2:31 pm, "Edward K. Ream" <[email protected]> wrote: > On Tue, Aug 17, 2010 at 11:33 AM, Edward K. Ream <[email protected]> wrote: > backward-delete-word appears to work as expected when there is a > selection. delete-word not so much. Please make any improvements > directly in the trunk. Thanks.
Looks like the question is what you expected... I don't think I ever use them when there is a selection. My initial thought was that it would act as if you had just pressed Backspace or Delete (i.e. it would delete the selection). I tried a few different editors: * gedit * Eclipse * Notepad++ * Notepad2 * Wordpad * Firefox text fields Eclipse is the only one that behaved as I expected. The others surprised me; they had a few different behaviors, probably depending more on implementation detail than any forethought. Since this doesn't seem to be a strong convention, I'm inclined to go with Eclipse, but I'm pretty biased, and it does seem to be in the minority. Regarding acting "smarter", I did some initial testing with a few different things in Eclipse. It seems each editor does its own implementation. I tested these in CDT (the C/C++ editor), JDT (the Java editor), and the plain text editor: * CamelCaseWords - CDT and JDT treat these as 3 words. The plain text editor treats them as one word. * under_scored_words - CDT treats the underscores as spaces, JDT as one word, and the plain text editor stops on both sides of the underscore (same as words with dashes). * words-with-dashes - CDT (and JDT and the plain text editor) stops on both sides of the dash; if there are multiple dashes, or a combination of dashes and other symbols, it treats them as a single entity. I'll think about this some more. Right now, I'm thinking that it could be a little smarter, but that per-language behavior is overkill (alternatively, I'm thinking maybe I should have tried to forget about Ctrl-Backspace when it didn't work in Leo...). -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en.
