Re: Caret

From: Philippe Verdy <verdy_p_at_wanadoo.fr>
Date: Mon, 12 Nov 2012 21:07:27 +0100

Is is REALLY enough.

Simply because these carets are **oriented** and are showing the direction
of insertion or ovewrite when you'll type text.

It is independant of the fact that you will later insert or delete
characters (generally, editors map the DELETE key fo delete the character
AFTER the insertion point, and the BACKSPACE key to delete the character
BEFORE the insertion point). The key here is AFTER and BEFORE, which is
unambiguous as means the contextual ordering in the backing store of
encoded plain text. The BiDi algorithm helps determining if AFTER and
BEFORE mean either LEFT or RIGHT (the direction shown by the caret).

Two part carets are not needed : you are creating a confusion with the
selection of text (where there are either two positions to mark in the
encoded text, possibly expanding to more pairs in the visual text, or two
positions to mark in the visual text, possibly expanding to more pairs in
the encoded text).

But may be one will want the possibility to encode two other distinct kinds
of carets: a START OF SELECTION caret and an END OF SELECTION caret: the
two kinds of carets being inserted independantly in the visual text
(possibly multiple times if the selection occurs in the encoded text and
created several spanning locuses in the visual text). These carets however
are not insertion nor overwrite carets which imply the same position for
everything visual or encoded.

A text editor :
- either will display selection with such pairs (typing something will
typically replace the full selection, or may reduce the selection in
overwrite mode, after deleting some characters ar start of the selection,
or may rarely "push" the selection which will remain visible even if
characters are inserted before that selection),
- or will display the normal insertion or overwrite caret defined at the
single position.

Usually, text selections do not need to be oriented (the selected text
itself is **already** oriented by itself), so the editor just needs to
render the area where it is located in the document to mark the fact that
it is selected. Only the insertion or overwrite carets need to render a
SINGLE direction at the SINGLE locus of the insertion point.

2012/11/12 Eli Zaretskii <eliz_at_gnu.org>

> > From: Philippe Verdy <verdy_p_at_wanadoo.fr>
> > Date: Mon, 12 Nov 2012 20:19:40 +0100
> > Cc: UnicoDe List <unicode_at_unicode.org>
> >
> > Have you seen how the caret behaves in Java applications ? It shows an
> > extra triangular arrow head, oriented to the left or right, and connected
> > to the top of the vertical line. And it is then really appearing NEARBY
> the
> > character it designates in the indicated direction.
>
> This is not enough. To show full information about the insertion
> point in bidirectional text, you need a two-part caret, because
> depending on whether you are going to insert or delete, and the
> directionality of inserted/deleted character, the locus of the changes
> can be different.
>
Received on Mon Nov 12 2012 - 14:10:02 CST

This archive was generated by hypermail 2.2.0 : Mon Nov 12 2012 - 14:10:03 CST