On 19/09/2022 10:19 am, Jean-Marc Lasgouttes wrote:
Le 17/09/2022 à 01:09, Andrew Parsloe a écrit :
I have a command-sequence that uses word-select prior to using cut.
Recently I was surprised to find the content of the *previous* item
saved to the clipboard being pasted rather than the expected one.
After experimenting, I think an unintuitive cursor positioning is the
cause.
Hi Andrew,
Indeed, selectWord does not really consider pre-existing selection.
Easy solution : reset selection before selecting word
More difficult one: extend current selection up to word boundaries.
I do not know which one is the most useful. What would you expect if
the original selection spans more that one word?
JMarc
For my particular command sequence, I changed it to repeat word-select,
which I suppose is your easy solution: the first word-select resets the
selection, the second then selects the word.
For a pre-existing selection spanning a blank between words I think your
more difficult solution is the intuitive behaviour: expand back to the
beginning of the first word and forward to the end of the second word.
Currently, it does just the second part. (Repeating word-select doesn't
work in this case.)
Andrew
--
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel