Re: justification/cursor navigation issues



On Fri, 2005-08-19 at 16:41 +0100, Damon Chaplin wrote:
> I'm working on a patch for justification:
>    http://bugzilla.gnome.org/show_bug.cgi?id=64538
> 
> One of the last remaining problems is with cursor navigation.
> (Currently if you press the up arrow at the ends of lines it does
> nothing, and if you press the down arrow it jumps down 2 lines.)
> 
> I think some of the cursor navigation code assumes that all the text in
> the PangoLayoutLines and PangoLayoutRun/PangoItems is contiguous.

I'm not quite sure what you mean by "contiguous", but my general
is feeling is that various things should be preserved:

 - Every character should be part of a cluster
 - The runs of a line should be visually contiguous

> However, my justification code trims whitespace at the ends of lines
> (and in future it may do things like replace text for hyphenation).

While whitespace shouldn't be taken into account for line wrapping,
I don't know if trimming it is right.

Think about the behavior when editing left justified wrapped text -
when entering spaces at the end of the line, the cursor should continue
to move to the right ... (probably stopping at the right margin rather
than continuing and adding a scrollbar.)

It would be very odd if space did nothing until you typed the next
character.

So we need to know how wide the whitespace of a line is when computing
the cursor position. If we set it to zero with in the PangoGlyphString
then we've lost the necessary information.

Regards,
						Owen

Attachment: signature.asc
Description: This is a digitally signed message part



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]