- Cut all text from a note with two paragraphs and paste it right in
  front of the now empty note (same par!) -> Stack overflow

This is true for any InsetText-based inset (eg. figure float) and you
don't have to cut you can copy and paste also.  The part about pasting
into the same paragraph is significant though.

Can someone (Juergen?) tell me the purpose of the inset parameter for
        InsetText::getMaxWidth (bv, inset) at insettext.C:1901

Nothing uses it.  So was it leftover from previous code or added but
incomplete?  Is there any reason why recursive code was used? Or was
someone planning on replacing it with an iterative solution?  (Is this
where the discussions about paragraph/inset iterators I've seen but
not really read come in?)

There is also an interesting pattern in the backtrace below which was
generated by starting a new document, insert a figure float, write one
word in the float, select with left mouse button and paste with
middle mouse button just before the inset (you can close it first if
you want to, it doesn't make any difference)

UpdateableInset::getMaxWidth is where we're hoping the recursion will
stop -- since owner() should be 0x0 at some stage (hopefully in the
outermost InsetText which is also where we start the sequence...)

It would seem from inset.C:315/316 that someone is hoping to be
calling UpdateableInset::getMaxWidth but gdb is reporting that
InsetCollapsible::getMaxWidth is getting called instead.  IIRC,
Juergen was complaining about this sometime ago but I only skimmed
through those discussions.

Any hints?

#209593 0x081167a1 in UpdatableInset::getMaxWidth (this=0x82ec538, bv=0x82a77a8) at 
inset.C:316
#209594 0x08137942 in InsetCollapsable::getMaxWidth (this=0x82ec538, bv=0x82a77a8, 
in=0x82ec590) at insetcollapsable.C:395
#209595 0x081167a1 in UpdatableInset::getMaxWidth (this=0x82ec590, bv=0x82a77a8) at 
inset.C:316
#209596 0x08133e4a in InsetText::getMaxWidth (this=0x82ec590, bv=0x82a77a8, 
inset=0x82ec538) at insettext.C:1915
#209597 0x081167a1 in UpdatableInset::getMaxWidth (this=0x82ec538, bv=0x82a77a8) at 
inset.C:316
#209598 0x08137942 in InsetCollapsable::getMaxWidth (this=0x82ec538, bv=0x82a77a8, 
in=0x82ec590) at insetcollapsable.C:395
#209599 0x081167a1 in UpdatableInset::getMaxWidth (this=0x82ec590, bv=0x82a77a8) at 
inset.C:316
#209600 0x08133e4a in InsetText::getMaxWidth (this=0x82ec590, bv=0x82a77a8, 
inset=0x82ec538) at insettext.C:1915
#209601 0x081167a1 in UpdatableInset::getMaxWidth (this=0x82ec538, bv=0x82a77a8) at 
inset.C:316
#209602 0x08137942 in InsetCollapsable::getMaxWidth (this=0x82ec538, bv=0x82a77a8, 
in=0x82ec590) at insetcollapsable.C:395
#209603 0x081167a1 in UpdatableInset::getMaxWidth (this=0x82ec590, bv=0x82a77a8) at 
inset.C:316
#209604 0x08133e4a in InsetText::getMaxWidth (this=0x82ec590, bv=0x82a77a8, 
inset=0x82ec590) at insettext.C:1915
#209605 0x0812eef1 in InsetText::textWidth (this=0x82ec590, bv=0x82a77a8, 
fordraw=false) at insettext.C:330
#209606 0x080d1483 in LyXText::workWidth (this=0x82edba0, bview=0x82a77a8) at text.C:60
#209607 0x080d78c0 in LyXText::prepareToPrint (this=0x82edba0, bview=0x82a77a8, 
row=0x82d1ed0, x=@0xbfffefc0, fill_separator=@0xbfffefc4, fill_hfill=@0xbfffefc8, 
fill_label_hfill=@0xbfffefcc, bidi=true) at text.C:2044
#209608 0x080e39de in LyXText::setCursor (this=0x82edba0, bview=0x82a77a8, 
cur=@0x82edc2c, par=0x82ca1d0, pos=4, boundary=false) at text2.C:2123
#209609 0x080e3f31 in LyXText::setCursorIntern (this=0x82edba0, bview=0x82a77a8, 
par=0x82ca1d0, pos=4, setfont=true, boundary=false) at text2.C:2214
#209610 0x080e3f0c in LyXText::setCursorIntern (this=0x82eaf98, bview=0x82a77a8, 
par=0x82ca1d0, pos=4, setfont=true, boundary=false) at text2.C:2209
#209611 0x080e3922 in LyXText::setCursor (this=0x82eaf98, bview=0x82a77a8, 
par=0x82ca1d0, pos=4, setfont=true, boundary=false) at text2.C:2097
#209612 0x080e2dfc in LyXText::pasteSelection (this=0x82eaf98, bview=0x82a77a8) at 
text2.C:1849
#209613 0x0805128d in BufferView::paste (this=0x82a77a8) at BufferView2.C:324
#209614 0x08057246 in BufferView::Pimpl::Dispatch (this=0x82a7e58, action=LFUN_PASTE, 
argument=@0xbffff530) at BufferView_pimpl.C:1509
#209615 0x08050145 in BufferView::Dispatch (this=0x82a77a8, action=LFUN_PASTE, 
argument=@0xbffff530) at BufferView.C:294
#209616 0x080ac5ba in LyXFunc::dispatch (this=0x8273c90, ac=19, 
do_not_use_this_arg=@0xbffff57c) at lyxfunc.C:1621
#209617 0x0817ffce in {anonymous}::ToolbarCB (ob=0x82a6170, ac=19) at 
Toolbar_pimpl.C:298
#209618 0x0818005a in C_Toolbar_ToolbarCB (ob=0x82a6170, data=19) at 
Toolbar_pimpl.C:310
#209619 0x00155973 in fl_object_qread () from /usr/X11R6/lib/libforms.so.0.88
#209620 0x00162f11 in fl_check_forms () from /usr/X11R6/lib/libforms.so.0.88
#209621 0x08140d8d in GUIRunTime::runTime () at GUIRunTime.C:86
#209622 0x080a0798 in LyXGUI::runTime (this=0x8263928) at lyx_gui.C:315
#209623 0x080a17f8 in LyX::LyX (this=0xbffff6e0, argc=0xbffff700, argv=0xbffff764) at 
../src/lyx_main.C:176
#209624 0x080b9c81 in main (argc=1, argv=0xbffff764) at ../src/main.C:38
#209625 0x003561f0 in __libc_start_main () from /lib/libc.so.6
(gdb)

Allan. (ARRae)

I got a bit sidetracked while looking into the other problem and
thought this one might be easier to figure out hahahahahaha

Reply via email to