Skip to content

Backward mouse text selection #53

Description

@mrc-lrn

'Backward' (i.e. with respect to the direction according to characters are printed) mouse selection does not work (neither in gtktsm test program nor in kmscon).

It is due to the fact that during a mouse text selection the pointer position is (continuosly) stored in the field sel_end of a structure tsm_screen. For a 'forward' selection it is not a problem, whereas for a backward selection it causes the loss of the end of the intended (text) area to be selected (in this kind of selection the end position is the first one selected and the start position is the last one).

I made a patch but it is quite crude. The basic idea consists in making mouse selection tracking and calculation of the selected text area two distinct operation: first track the selection, then update the limits of the text area. Only the last position of the mouse selection is continuously updated (the first position is stored once at the beginning), whereas the limits of the text area are both updated.

backward selection.patch

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions