On 04/14/2011 05:58 PM, Enrico Forestieri wrote:
On Thu, Apr 14, 2011 at 09:53:46PM +0200, Peter Kuemmel wrote:
This patch

     http://www.lyx.org/trac/attachment/ticket/7394/resetAnchor.patch

fixes the crash in

     http://www.lyx.org/trac/ticket/7394

But I don't know if it introduces any side effects.
This is not the correct fix, and neither is removing anchor_.clear().
For example, the assert is avoided but when you shift-click, the entire
document from the beginning gets selected and not from the cursor
position. Please, find attached the correct fix.

The same fix is therefore needed in LFUN_SCREEN_UP and LFUN_SCREEN_DOWN, since, as I said in the other email, the same crash happens there.

Auditing the other calls to Cursor::reset... What about in BufferView::setCursor() itself? I've seen some weird selection behavior that may be caused by the lack of a resetAnchor() call there, but I don't know for sure.

You definitely get weird behavior with LFUN_ALL_CHANGES_*: The anchor seems to be left at the end of the Buffer. So same problem there.

Richard

Reply via email to