[EMAIL PROTECTED] wrote:
Author: abraunst
Date: Tue Sep  4 00:16:54 2007
New Revision: 20026

URL: http://www.lyx.org/trac/changeset/20026
Log:
fix multi-cell selection

Modified:
    lyx-devel/trunk/src/TextMetrics.cpp

Modified: lyx-devel/trunk/src/TextMetrics.cpp
URL: http://www.lyx.org/trac/file/lyx-devel/trunk/src/TextMetrics.cpp?rev=20026
==============================================================================
--- lyx-devel/trunk/src/TextMetrics.cpp (original)
+++ lyx-devel/trunk/src/TextMetrics.cpp Tue Sep  4 00:16:54 2007
@@ -1872,6 +1872,10 @@
        if (!cur.selection())
                return;
        if (!ptr_cmp(cur.text(), text_))
+               return;
+       
+ //if the anchor is outside, this is not our selection + if (!ptr_cmp(cur.anchor().text(), text_))
                return;

Yes, that's the right fix, thanks Alfredo. I expect that we'll see more of these. The reason why this bug did not show up in 1.5 (or did it?) is that the text_metrics_ member was not cleared in BufferView when doing a full repaint; so the coordcache still contained the info.

Abdel.

Reply via email to