Apache OpenOffice (AOO) Bugzilla – Issue 31110
"Delete to end of word" deletes two words instead of one right after a dash
Last modified: 2017-05-20 11:26:01 UTC
When the cursor is positioned right after a dash and Ctrl+Delete is pressed (by default this is the "Delete to end of word" command), two words are deleted. Steps to reproduce the problem: 1. Type several words and include a dash, e.g. abc-def 123 xyz 2. Position the cursor right after the dash ('|' denotes the cursor): abc-|def 123 xyz 3. Press "Ctrl+Delete". The result is: abc-|xyz
Still happens in 680. Ctrl-Del in the mentioned position removes two words instead of one.
It seems that the hyphen has little to do. The same behaviour can be observed with other separators as well. I tried with comma (','), left and right parentheses ('(',')'), exclamation mark ('!'). In all these cases the product behaved as mentioned in the original report. With period ('.') the behaviour is different, but I have a strong suspicion that period is not treated as a separator, which will explain the bug not showing up. When I tested with space and tab, it worked as expected (deleted only one word).
I replicated the bug with OOo 1.1.2 and Windows XP Version 2002 Service Pack2. Here are the replication steps: 1.Open a new text document. 2.Type text “abc-def 123 xyzâ€. There is no space between the two words separated by the dash. 3.Point the cursor right after the dash “-†in the document. 4.Press “Ctrl + Deleteâ€. The resulting text is “abc- xyzâ€. This failure applys to almost all the other separators including: ` ~ ! @ # $ % ^ & * ( ) _ - + = | \ : ; “ ' < , > / ? * It raises an interesting issue dealing with the period separator. Here are the detail follow up test steps: Case 1 1.Type text “45c.f123 fdsâ€. Use period to separate two words. The word left to the period ending with a character. The word right to the period starting with a character. 2.Point the cursor right after the period “.†3.Press “Ctrl + Deleteâ€. It only deletes one word as expected. The result is “45c. fdsâ€. Case 2 1.Type text “45c.123fd sdf â€. Use period to separate two words. The word left to the period ending with a character. The word right to the period starting with a number. 2.Point the cursor right after the period “.†3.Press “Ctrl + Deleteâ€. It deletes two words after the period. The result is “45c.â€. Case 3 1.Type text “c45.12fd3 fdsâ€. Use period to separate two words. The word left to the period ending with a number. The word right to the period starting with a number. 2.Point the cursor right after the period “.†3.Press “Ctrl + Deleteâ€. It only deletes one word as expected. The result is “c45. fdsâ€. Case 4 1.Type text “c456.tr23fd sdf â€. Use period to separate two words. The word left to the period ending with a number. The word right to the period starting with a character. 2.Point the cursor right after the period “.†3.Press “Ctrl + Deleteâ€. It deletes two words after the period. The result is “c456.â€. If period separates two words whose closet character to the period belongs to two different types (numerical or alphabetic), Ctrl + Deleteâ€deletes two words after the period.
Still here in 1.1.4 for Windows. Didn't do extensive testing, just noticed that with the cursor right after a comma (as in "xxx,a b c") I managed to delete two words via Ctrl+Del, so I presumed this is the same bug still hanging around.
Reset assigne to the default "issues@openoffice.apache.org".