On Wed, 28 Nov 2001, John Levon wrote: > On Sun, Nov 25, 2001 at 09:31:42AM +0100, Michael Schmitt wrote: > > > - Load file "scary_eqns.lyx" and try to click at the last subscript "0" in a >formula called "philinear" > > -> the cursor is positioned past the formula > > can I have this file please ?
It's included in: http://www.devel.lyx.org/~rae/CCP2000.tar.gz > > - Insert a minipage into an empty document; insert a few characters in front of the > > (open) minipage -> the minipage is moved past the right border of the LyX main >window > > fixed by Allan. Did I do that? Hmmm... Maybe I fixed it in my sleep... or I used somebody elses fingers and keyboard. > > - Open a new document; insert a note inset with two pars (e.g., letters "a" and >"b"); > > cut the pars and place them in front of the note (separate paragraph!); > > cut the note; move the cursor upwards > > This now infinite loops for me with : > > InsetText is 0x43257ef4 > inset_owner is (nil) Juergen's and John's latest fixes seem to have solved the infinite recursion and I now get the inset drawn okay. However there is a small copy&paste problem remaining. There is a difference between using the toolbar for copy and paste (c&p) and just using select and paste (s&p) (ie. select with left mouse LMB, paste with middle mouse MMB) inside a collapsible inset or in a top level paragraph. The problem is exhibited when trying to copy a selection that includes an inset. Example: fred [foot] bloggs [float:figure more [foot] text] 1. If you s&p the first line ("fred [foot] bloggs") and paste it in the figure float you only get "fred bloggs" inserted. 2. If you c&p instead you get what you asked for: "fred [foot] bloggs" 3. If you s&p it into a top-level paragraph (ie. one that isn't inside an inset) then the first time you paste you get "fred [foot] bloggs" but the second and subsequent times you paste you get "fred bloggs". 4. if you copy, place the cursor somewhere the selection disappears but is still in the copy-buffer and paste with the MMB you get "fred bloggs" no matter where you paste. 5. If you s&p the line from the figure inset ("more [foot] text") no matter where you paste it you only get "more text". 6. However, if you c&p that line anywhere you get "more [foot] text" Cases 2 and 6 seem to indicate that LFUN_COPY and LFUN_PASTE work okay (ie. copy and paste). Cases 3 and 4 appear to indicate correct operation also since if the selection exists you LFUN_PASTE otherwise we are pasting from the clipboard (using FLUN_PASTESELECTION -- that name is a little confusing). That leaves cases 1 and 5 as suspect actions. Both these involve either MMB pasting into an inset or selecting in an inset. GDB segfaults while I'm trying to do some debugging on this (trying to check the contents of some variables). The funny thing is I'm sure case 5 worked correctly the other day but crashed from the infinite recursion before it could display the result. SO far it looks like BufferView::Pimpl::workAreaButtonPress doesn't always see that a selection is set in: if (button == 2 && bv_->text->selection.set()) { owner_->getLyXFunc()->dispatch(LFUN_COPY); paste_internally = true; } as a result paste_internally isn't being set and as a result of that we call LFUN_PASTESELECTION insetad of LFUN_PASTE when the selection is inside an inset. Which seems to indicate something weird about selections or cursor-handling inside insets. But I'm very confused by all the different moving parts and not getting anywhere at present :( I'm guessing something about either Inset[Text|Collapsible]::insetButtonRelease() which don't handle setting the cursors for a selection when the LMB is released. But then again BufferView::Pimpl::workAreaButtonRelease() doesn't seem to do that either. What sets up the cursors/selection when a LMB is released? Allan. (ARRae) Lost.