Closed Bug 108125 Opened 23 years ago Closed 22 years ago

Move to next word (Option/Ctrl+Right) gets stuck to the left of punctuation

Categories

(Core :: DOM: Editor, defect)

defect
Not set
normal

Tracking

()

VERIFIED DUPLICATE of bug 127321
Future

People

(Reporter: mpt, Assigned: mjudge)

References

Details

(Whiteboard: [Hixie-P0][Hixie-1.0][caret] EDITORBASE- [wordbreak])

Build: 2001103108, Mac OS 9.1

To reproduce:
1.  Copy and paste this line (including the initial spaces) into the
    `Additional Comments:' field of this bug report:
    abc def, ghi jkl. mno ;pqr ?stu vwx
2.  Move the caret to the beginning of the line.
3.  Type Option+Right or Ctrl+Right (depending on your platform) repeatedly,
    and make a list of which two characters the caret is between after each
    step.

What you should get:
*   " a" "c " "f," " g" "i " "l." " m" "o " ";p" "r " "?s" "u " "x[CR]"

What you actually get:
*   " a" "c " " d" "f," "f," "f," "f," "f," "f," "f," "f," "f," "f,"

The problem with " d" -- a single space being treated as a word -- is probably a
separate bug (though it contributes to the disturbing impression that going in
the left and right directions in word-by-word mode are handled by completely
separate code, when they should not be). The bug here is that navigating
rightward in word-by-word mode gets stuck permanently to the left of any
punctuation character. This does not happen when navigating leftward, as you can
see by starting at the right end of the line and typing Option+Left or Ctrl+Left.

See also bug 92850.
--> mjudge (selection/caret navigation)
Assignee: kin → mjudge
I think this was caused by the fix for bug 98546.  I see it on Windows, too, so
changing to all/all.

OS: Mac System 9.x → All
Hardware: Macintosh → All
the changes for 98546 shouldn't impact win32 at all so.....
Whiteboard: EDITORBASE
It does if you enable the layout.word_select.stop_at_punctuation pref, which I
guess I must have done at some point!
On Mac OS X build 2001121805, I see similar but slightly different behavior.
When I Opt+Right Arrow through the line, the caret moves from word to word. It
starts at the space, then moves to the begining of abc, then on the next event
it moves to the end of abc. The next event causes the caret to hit the begining
of def, and then after the next event, it stops at the comma (between the f and
the ,) and will not move any further.
removing EDITORBASE- per meeting
Whiteboard: EDITORBASE → EDITORBASE-
Status: NEW → ASSIGNED
Target Milestone: --- → Future
Whiteboard: EDITORBASE- → [Hixie-P0][Hixie-1.0][caret] EDITORBASE-
I just tried this on Win98 build 041003, and I'm no longer seeing this problem.
I'm going to try to reproduce when I get home to my OS X box.
Here's where some other editors stop on
"abc def, ghi jkl. mno ;pqr ?stu vwx".
-------------------------
"c "
" L" 
Using 'L' to mark the position.  The above means the caret is between
'c' and ' ', or is on ' ', and an inserted character will appear
between 'c' and ' '.
-------------------------

abc def, ghi jkl. mno ;pqr ?stu vwx
   L   L    L   L    L    L    L   L    Emacs 20.7.1, Ctrl-Right
L   L    L   L    L    L    L   L                     Ctrl-Left
L   L  L L   L  L L   LL   LL   L       Vi IMproved 5.7.8  command "w"
L   L    L   L    L   L    L    L                          command "W"
L   L  L L   L  L L   LL   LL   L                          command "b"
L   L    L   L    L   L    L    L                          command "B"
L   L    L   L    L   L    L    L  L    Notepad (build 2195) Ctrl-Right 
L   L    L   L    L   L    L    L  L                         Ctrl-Left
L   L  L L   L  L L   LL   LL   L  L    Wordpad (build 2195) Ctrl-Right
L   L  L L   L  L L   LL   LL   L  L                         Ctrl-Left
L   L  L L   L  L L   LL   LL   L  L    IE 5.00.3315.1000 Ctrl-Right
L   L  L L   L  L L   LL   LL   L  L                      Ctrl-Left
abc def, ghi jkl. mno ;pqr ?stu vwx
L  LL   LL  LL   LL  LL   LL   LL  L    Mozilla 0.9.9     Ctrl-Right
L   L    L   L    L   L    L    L  L                      Ctrl-Left

Notepad, Wordpad, and Internet Explorer are all from Windows 2000,
service pack 2.  Emacs and vi are from RedHat 7.0.

abc def, ghi jkl. mno ;pqr ?stu vwx
L   L    L   L    L    L    L   L      MS-DOS Editor 2.0.026 Ctrl-Right
L   L    L   L    L    L    L   L                            Ctrl-Left
Whiteboard: [Hixie-P0][Hixie-1.0][caret] EDITORBASE- → [Hixie-P0][Hixie-1.0][caret] EDITORBASE- [wordbreak]
*** Bug 159531 has been marked as a duplicate of this bug. ***
*** Bug 147470 has been marked as a duplicate of this bug. ***
Dupe of 127321, which it looks like was just fixed on the trunk.

*** This bug has been marked as a duplicate of 127321 ***
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → DUPLICATE
verified.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.