Closed Bug 181926 Opened 22 years ago Closed 18 years ago

Delete forward word doesn't get the space

Categories

(Core :: DOM: Selection, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: akkzilla, Assigned: mjudge)

References

Details

Branched off from bug 162083:
delete word forward repeatedly, and you delete up to the space, then the space,
then up to the next space, etc.  Obviously it should get the space at the same time.

This doesn't happen on Windows, I'm told.  I strongly suspect this has to do
with assumptions selection is making about the value of the pref
"layout.word_select.stop_at_punctuation".
I bet this is the same issue as bug 142120.  See that bug for some hints on
where to fix it.
As mentioned in that bug: it's probably the
layout.word_select.eat_space_to_next_word rather than the one I mentioned
previously.  Word motion/deletion backwards works, but forward doesn't work right.

The code is in nsTextFrame.cpp and is interwoven with the bidi code; cc'ing bidi
experts since any fix for this will surely affect that code.

If anyone is willing to do a little test, I would be very interested to hear
what happens in bidi text when layout.word_select.eat_space_to_next_word is set
to false (as it is on mac and unix).  Does word motion take stop at spaces (i.e.
end of word, space, end of word, space) in one direction but not the other in
bidi text?  Does the direction that works right alternate?  Or do both
directions work the same?
One other question: the code in nsTextFrame.cpp is much more complicated for the
forward case than for the backward case.  Does anyone know whether there's a
reason for that?  Could they share most of that code, except for calling
tx.GetPrevWord vs. tx.GetNextWord according to the direction?
Mike's code (and related to other bugs on his plate).
Assignee: akkana → mjudge
This was fixed back in April 2004, by the fix for bug 142120.
Status: NEW → RESOLVED
Closed: 18 years ago
Depends on: 142120
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.