Commit Graph

77 Commits

Author SHA1 Message Date
Asger Ottar Alstrup
c3a34a64f1 Undo cleaned up. It seems to work pretty well now.
* undo_funcs.h: Removed setCursorParUndo to simplify things a bit.
	Renamed setUndo family to recordUndo. Renamed FINISH to ATOMIC
	which I think is a bit clearer. EDIT is gone, since it was
	premature optimisation, and broken for mathed anyway.
	* undo_funcs.C (performUndoOrRedo): Cleaned up and made it work
	with cursor positioning in insets as well (math insets still do not
	work, but that's a different story anyway.) It mysteriously
	crashes sometimes with undo in the first paragraph, but I'm fairly
	confident that this is a compiler bug.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7358 a592a061-630c-0410-9148-cb99ea01b6c8
2003-07-25 19:18:43 +00:00
Asger Ottar Alstrup
8a2e3e4d73 Fixed undo crash in first paragraph by avoiding special case and doing a
full rebreak on every undo. Undo still is unpredictable in nested insets,
but hey, one less crash is worth a beer anyway.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7355 a592a061-630c-0410-9148-cb99ea01b6c8
2003-07-25 11:58:47 +00:00
André Pönitz
cd12251e27 'full redraw' related stuff that's innocent for the upward-selection-in-tables bug.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7285 a592a061-630c-0410-9148-cb99ea01b6c8
2003-07-15 16:25:02 +00:00
Lars Gullik Bjønnes
92d522b7f1 introduce namespace lyx::support
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7224 a592a061-630c-0410-9148-cb99ea01b6c8
2003-06-30 23:56:22 +00:00
André Pönitz
cc19a4ff58 move cursor related data fro LyXText to new strcut TextCursor
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7216 a592a061-630c-0410-9148-cb99ea01b6c8
2003-06-27 11:53:41 +00:00
André Pönitz
44ba6be615 fix a 'off by some' error in multipar-undo
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7109 a592a061-630c-0410-9148-cb99ea01b6c8
2003-06-05 12:16:06 +00:00
André Pönitz
4b14c1d9be try to position cusor correctly after undo
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7107 a592a061-630c-0410-9148-cb99ea01b6c8
2003-06-04 16:14:36 +00:00
André Pönitz
a5c7dde1e4 the latest undo patch without the paragraphlist stuff
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7102 a592a061-630c-0410-9148-cb99ea01b6c8
2003-06-04 12:45:26 +00:00
André Pönitz
e412a2a53e bit of undo
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7100 a592a061-630c-0410-9148-cb99ea01b6c8
2003-06-04 07:14:05 +00:00
André Pönitz
a8e8e755fc rename the members of Dimension
* dimension.[Ch]: a -> asc, d -> des, w -> wid


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7053 a592a061-630c-0410-9148-cb99ea01b6c8
2003-05-27 13:55:03 +00:00
Lars Gullik Bjønnes
9aee8a07b0 parlist-19-a.diff
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7042 a592a061-630c-0410-9148-cb99ea01b6c8
2003-05-25 08:49:48 +00:00
Lars Gullik Bjønnes
297b40c725 make ParagraphList::push_back take a reference instead of a pointer.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7036 a592a061-630c-0410-9148-cb99ea01b6c8
2003-05-24 11:54:10 +00:00
André Pönitz
123853dc9b most of textHandleUndo
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7027 a592a061-630c-0410-9148-cb99ea01b6c8
2003-05-23 13:35:36 +00:00
André Pönitz
ebd003e634 fix createUndo
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7024 a592a061-630c-0410-9148-cb99ea01b6c8
2003-05-23 11:07:23 +00:00
André Pönitz
983d23f87d setUndo2 interface change
access to topmost plist item (as reference...)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7022 a592a061-630c-0410-9148-cb99ea01b6c8
2003-05-23 10:33:40 +00:00
Lars Gullik Bjønnes
314b4903ac The "I want this in now" patch.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7018 a592a061-630c-0410-9148-cb99ea01b6c8
2003-05-23 07:44:09 +00:00
Lars Gullik Bjønnes
62be565337 add warning make controllers compile and remove some alomost unused functions, comment out usage by undo
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7004 a592a061-630c-0410-9148-cb99ea01b6c8
2003-05-22 16:10:34 +00:00
André Pönitz
81a967c573 duplicated code, ParIterator::operator=
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7002 a592a061-630c-0410-9148-cb99ea01b6c8
2003-05-22 15:16:58 +00:00
André Pönitz
204a070130 return a ParIterator from getParFromID
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6996 a592a061-630c-0410-9148-cb99ea01b6c8
2003-05-22 08:01:41 +00:00
André Pönitz
14580a289e edit->LFUN_INSET_EDIT + CHangeLog + working URL insets.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6969 a592a061-630c-0410-9148-cb99ea01b6c8
2003-05-16 07:44:00 +00:00
André Pönitz
1badafaa40 * buffer.[Ch]: new function hasParWithId() to help to get rid of a
few naked Paragraph *.
* undo_funcs use getParagraphs() instead of getFirstParagraph()


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6935 a592a061-630c-0410-9148-cb99ea01b6c8
2003-05-05 17:28:21 +00:00
André Pönitz
aee7213a76 replace getFirstParagraph() by getParagraphs()
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6934 a592a061-630c-0410-9148-cb99ea01b6c8
2003-05-05 15:39:48 +00:00
André Pönitz
94c454c6ac undo-6.diff: another next() removed
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6928 a592a061-630c-0410-9148-cb99ea01b6c8
2003-05-02 15:21:45 +00:00
André Pönitz
627ffcb251 undo-5.diff: remove lastundopar
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6927 a592a061-630c-0410-9148-cb99ea01b6c8
2003-05-02 14:54:08 +00:00
André Pönitz
c19753c9be undo-4.diff ("Another next() ...")
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6926 a592a061-630c-0410-9148-cb99ea01b6c8
2003-05-02 14:44:50 +00:00
André Pönitz
24727d42c4 *** empty log message ***
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6925 a592a061-630c-0410-9148-cb99ea01b6c8
2003-05-02 14:12:01 +00:00
André Pönitz
5cec61cb69 pull out common code
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6924 a592a061-630c-0410-9148-cb99ea01b6c8
2003-05-02 13:38:53 +00:00
André Pönitz
4b8025d992 * undo_funcs.C:
* undo.[Ch]: rely on std::vector<Paragraph *> instead of manually
    linked lists


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6923 a592a061-630c-0410-9148-cb99ea01b6c8
2003-05-02 13:11:39 +00:00
Lars Gullik Bjønnes
cd50f3ae85 almost only ws changes
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6916 a592a061-630c-0410-9148-cb99ea01b6c8
2003-05-01 23:24:30 +00:00
André Pönitz
605912d575 fix Undo as suggested by Alfredo
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6895 a592a061-630c-0410-9148-cb99ea01b6c8
2003-04-30 07:04:33 +00:00
Lars Gullik Bjønnes
b7ba81d387 003-04-30 Lars Gullik Bj�nnes <larsbj@gullik.net>
* text3.C (dispatch): do not convert iterator -> pointer
        * undo_funcs.C (setCursorParUndo): ditto
        * text_funcs.C (transposeChars): ditto

        * text2.C (setLayout): ws changes only

        * text.C (breakParagraph): do not convert iterator -> pointer
        (insertChar): ditto
        (acceptChange): ditto
        (rejectChange): ditto
        (changeCase): ditto
        (Delete): ditto
        (backspace): ditto

        * BufferView.C (lockedInsetStoreUndo): do not convert iterator ->
        pointer


2003-04-30  Lars Gullik Bj�nnes  <larsbj@gullik.net>

        * insettext.C (setFont): do not convert iterator -> pointer

        * insettabular.C (localDispatch): do not convert iterator -> pointer
        (setFont): ditto
        (tabularFeatures): ditto


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6889 a592a061-630c-0410-9148-cb99ea01b6c8
2003-04-29 23:59:39 +00:00
André Pönitz
3a2a63d322 restrict scope of temporary variables
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6886 a592a061-630c-0410-9148-cb99ea01b6c8
2003-04-29 15:24:37 +00:00
André Pönitz
aad2de15b1 move common code of textUndo and textRedo to common helper function
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6884 a592a061-630c-0410-9148-cb99ea01b6c8
2003-04-29 14:50:11 +00:00
André Pönitz
79b459d3f0 simpler logic to create 'end' from 'behind'
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6883 a592a061-630c-0410-9148-cb99ea01b6c8
2003-04-29 14:31:53 +00:00
André Pönitz
a510a0265f remove two *& and a useless cast
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6882 a592a061-630c-0410-9148-cb99ea01b6c8
2003-04-29 14:10:13 +00:00
André Pönitz
653eaace76 * paragraph.h: make operator= private unimplemented as long as it is
unusable

  * ParagraphList.C: whitespace

  * paragraph.[Ch]:
    paragraph_pimpl.[Ch]:
    paragraph_funcs.C:
    CutAndPaste.C:
    undo_funcs.C: whitespace + Paragraph *  -> Paragraph (const) &

  * text2.C:
    undo_funcs.[Ch]: Paragraph * -> ParagraphList::iterator


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6881 a592a061-630c-0410-9148-cb99ea01b6c8
2003-04-29 14:05:54 +00:00
André Pönitz
263b9fc043 *** empty log message ***
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6878 a592a061-630c-0410-9148-cb99ea01b6c8
2003-04-29 10:39:08 +00:00
André Pönitz
d19f82e515 more of Lars' parlist changes
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6873 a592a061-630c-0410-9148-cb99ea01b6c8
2003-04-28 18:20:31 +00:00
Lars Gullik Bjønnes
1c1473e7ec op-1-a.diff
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6821 a592a061-630c-0410-9148-cb99ea01b6c8
2003-04-16 00:02:38 +00:00
Lars Gullik Bjønnes
0408f69287 Make lyxcursor store a ParagraphList::iterator, change three functions to take a ParagraphList::iterator instead of a ParagraphList::iterator. Other changes to adjust for this.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6741 a592a061-630c-0410-9148-cb99ea01b6c8
2003-04-09 09:15:20 +00:00
Lars Gullik Bjønnes
6ce86e2bfe parlist-a-1.diff
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6683 a592a061-630c-0410-9148-cb99ea01b6c8
2003-04-02 17:11:38 +00:00
John Levon
0623d1f074 The markDirty() and fitCursor() changes
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6537 a592a061-630c-0410-9148-cb99ea01b6c8
2003-03-19 14:45:22 +00:00
Lars Gullik Bjønnes
064714a102 Remove the BufferView* arg from almost all LyXText class functions.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6519 a592a061-630c-0410-9148-cb99ea01b6c8
2003-03-17 16:25:00 +00:00
John Levon
3b9620ae6d paint cleanups as sent to list
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6517 a592a061-630c-0410-9148-cb99ea01b6c8
2003-03-17 01:34:36 +00:00
André Pönitz
5246fc5583 split inset -> inset + updatableinset
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6212 a592a061-630c-0410-9148-cb99ea01b6c8
2003-02-20 17:39:48 +00:00
Lars Gullik Bjønnes
99d1627a47 dont use pragma impementation and interface anymore
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6138 a592a061-630c-0410-9148-cb99ea01b6c8
2003-02-13 16:53:15 +00:00
Jürgen Vigna
3113e957be Backed out a change of my last patch which I now see is not correct. This
should fix the undo bugs we see.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5610 a592a061-630c-0410-9148-cb99ea01b6c8
2002-11-08 14:51:03 +00:00
Jürgen Vigna
f7d3fe8836 Fix undo bugs.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5395 a592a061-630c-0410-9148-cb99ea01b6c8
2002-10-14 14:59:50 +00:00
John Levon
1b8855bed8 small fixes
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5214 a592a061-630c-0410-9148-cb99ea01b6c8
2002-09-06 01:41:01 +00:00
John Levon
cf216cd7fc Rob's patch and some minor cleanup
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5092 a592a061-630c-0410-9148-cb99ea01b6c8
2002-08-24 22:02:30 +00:00