I think I am close to correctly fixing #8543, where search finds the
same word twice when switching directions.

See the patch here:
http://www.lyx.org/trac/attachment/ticket/8543/0001-This-patch-flips-the-cursor-but-sel-is-lost.patch

The only problem I have is that LFUN_SELECTION_FLIP loses the
selection (this is a problem because it looks bad and if you change
directions twice in a row we are back to the original problem):

Why is the selection lost? Where is it being redrawn?
How can I use cur.selectionBegin(), cur.selectionEnd(),
cur.selBegin(), and cur.selEnd() to do one of the following?
(1) keep the selection
or
(2) lose it but redraw it how it was after I move the cursor

Thanks,

Scott

Reply via email to