Skip to content

TEDIT selection by left-button sweeping? #1517

@rmkaplan

Description

@rmkaplan

In Word and some (most?) other editors, a single click of the left button gives you a point selection, the caret blinking between 2 characters. If you want to extend the selection, you hold the mouse down after clicking and sweep out the characters you want to include in the selection.

If you left-click in Tedit, you get a blinking caret, but you also see that the single character either before or after the mouse position is selected and underlined. If you don't release the mouse, but drag it along, the caret moves with it, and you end with a single character selection somewhere else on the screen. You don't see that one end of the selection is pinned where the mouse first went down and then is extended either before or after that, as you drag and sweep.

The single character selection is kind of odd (except when you are pointing at an image object). When we had keyboards with formatting keys (Bold, Italic,etc), pressing one of those keys would not only set the mode for future typing at that position, but also change the looks of that single character, whether you intended that or not. (We see this behavior now with the softkeys that you get by loading lispusers/EDITKEYS, and you would also see this if we set up e.g. meta-B, meta-I etc as Tedit action keys.)

I think it makes more sense, first, to change the current behavior so that clicking with the left-button always (except for image objects) gives you a point selection, with no underlining. You type and delete from there. Any new looks that you apply would affect only new characters that you type at that point (in Tedit, those are the "caret looks").

But also, there is code in Tedit for extending selections by dragging the mouse, but currently this is tied only to the right button. If you have selected a point/character with Left or a word with Middle (or a line or paragraph from the margin), then clicking and holding the right button will extend that selection either forwards or backwards (to the character, word, paragraph boundaries according to the original type).

I don't think it would be too difficult (famous last words) to bind that extension behavior to the Left and Middle buttons, so that moving the mouse while Left or MIddle is held down doesn't change the initial point of a selection, as it does now, but extends the selection forward or backward from that anchor position.

This would make Tedit behave a little less idiosyncratically. Of more importance, it would probably make it less dependent on having or simulating a three-button mouse. (Interpreting double and triple clicks for determining the selection-type would be the next move in that direction.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions