Issue 31110

Summary: "Delete to end of word" deletes two words instead of one right after a dash
Product: Writer Reporter: bsb <bsb_2>
Component: codeAssignee: AOO issues mailing list <issues>
Status: CONFIRMED --- QA Contact:
Severity: Trivial    
Priority: P4 CC: issues
Version: OOo 1.1.2   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---

Description bsb 2004-07-05 16:04:16 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
Comment 1 michael.ruess 2004-07-06 10:59:10 UTC
Still happens in 680. Ctrl-Del in the mentioned position removes two words
instead of one.
Comment 2 bsb 2004-07-12 12:20:30 UTC
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).
Comment 3 runping 2005-02-04 20:03:37 UTC
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. 
Comment 4 bsb 2005-05-19 06:20:35 UTC
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.
Comment 5 Marcus 2017-05-20 11:24:43 UTC
Reset assigne to the default "issues@openoffice.apache.org".
Comment 6 Marcus 2017-05-20 11:26:01 UTC
Reset assigne to the default "issues@openoffice.apache.org".