Re: Unicode bidi algorithm and editing



 ---- you wrote: 
> 
> I've been working on making GtkEntry handle bidirectional
> editing, and have come across a few cases where the behavior
> seems counter-inutiutive and confusing.
> 
> One example is when entering a string of text that is counter
> to the base direction for an entry.
> 
> Say, I want to type
> 
> "he said, ITS A CAR"
> 
> where the capitalized string is in a RTL language, with the
> base direction being LTR.
> 
> After I type:
> 
>  "he said, ITS "
> 
> then, this is displayed as:
> 
>  "he said, STI |"
>               
Why not make the cursor stationary after the comma and let the string move right as you type. Then it will show something like this:
   "he said, | STI"
The cursor will move to end of the string when you press the mode switch key after the RTL string is done.

> 
> with the space afterwards, and the cursor after the space, since the
> directionality of the neutral space is resolved to the base direction
> in this case. But then I type the "A", and the display jumps to
> 
>  "he said, |A STI"
>           
> With the space properly positioned and the cursor after the A.
> This jumping continues with every word entered. Perhaps this
> is acceptable - after all, entering multi-word embedded strings
> is most likely considerably less common than entering an
> embedded single-word string. 
> 
> But it does strike me as confusing, and it gets really bad if the
> string is long enough to force the entry to scroll to display the
> cursor.
> 
> How is this generally handled? The only solutions I can see
> are to:
>  
>  a) Put in explicit directional overrides for the space characters
>     dependending on the direction of the keyboard
> 
>  b) Treat the cursor position specially when doing the directional
>     reordering.
> 
> Neither of these seem at all attractive.
> 
> Regards,
>                                         Owen

-----------------------------------------------------
Get free personalized email at http://email.lycos.com



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