Commit Graph

76 Commits

Author SHA1 Message Date
Vincent van Ravesteijn
b7ff36304d Use Change::isSimilarTo to find a change when merging changes.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33284 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-31 00:21:52 +00:00
Tommaso Cucinotta
c0d42b97ee Made replace behaviour more standard: when pressing replace (next or previous) button:
-) if a selection exists, and it matches, then it is replaced;
-) next match is searched for and, if found, it is selected.
After a replace, next match is searched for only beyond the replaced text
(and not inside the replaced text).


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33267 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-30 10:11:24 +00:00
Tommaso Cucinotta
52c059e68a Make the fake sequence for braces highly unlikely (addressing #6478).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33253 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-29 07:35:13 +00:00
Tommaso Cucinotta
c6784d708d Open or closed braces ({ or }) are now translated to non-braces fake constructs while searching (fixes #6478, avoiding assert).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33248 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-28 17:26:18 +00:00
Tommaso Cucinotta
ddebdc4514 Now the local text language is kept while replacing text (addressing #6171).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32961 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-11 02:20:51 +00:00
Vincent van Ravesteijn
43c8de8138 Cosmetics mainly: Rename math.h to cmath, reorder some includes, remove some includes and remove some superfluous "lyx::".
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32934 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-10 12:37:50 +00:00
Tommaso Cucinotta
fb4dfdf189 Implemented "whose words" option of the Advanced F&R feature.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32905 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-09 12:39:29 +00:00
Vincent van Ravesteijn
5079badb65 Fix bug #6428: Assertion when navigating to next change while in math mode.
We need to leave the math inset before trying to access cur.paragraph().

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32791 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-06 17:29:39 +00:00
Vincent van Ravesteijn
b0910eb6d4 Why was there a 1 ? We only have to make sure that pos - 1 >= 0.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32772 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-05 16:34:52 +00:00
Tommaso Cucinotta
5cc2d6d73c Advanced F&R rework:
- scopes now handled in FindAndReplaceWidget, while lyxfind.cpp only searches within single buffer
- cursor().result().dispatched() now encodes whether a match was found or not, after LFUN_WORD_FINDADV dispatch
- removed a few unneeded functions
- followed a few cosmetic advices


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32760 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-04 12:29:38 +00:00
Tommaso Cucinotta
9e5a12b905 No need for the new LyXView::selectDocumentBuffer() method, same thing may be done with LFUN_SWITCH_BUFFER (vfr advice).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32739 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-01 11:14:01 +00:00
Tommaso Cucinotta
82e07a4185 Code cleanup.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32682 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-30 22:21:23 +00:00
Tommaso Cucinotta
24e2c495fe Implemented S_OPEN_BUFFERS scope in Advanced Find feature (keep searching and find all occurrences within all open buffers).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32680 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-30 21:50:55 +00:00
Tommaso Cucinotta
605ac8e46a Cosmetics: removed unneeded std::
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32679 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-30 18:58:20 +00:00
Tommaso Cucinotta
5da4ccb931 Implemented the "Current Buffer" & "Current (Master) Document" scopes in the Advanced Find and Replace feature.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32678 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-30 18:40:18 +00:00
Tommaso Cucinotta
6675847986 Fixed bug: now, when searching backwards, after wrap-around question, if match is beyond the cursor position then it is correctly found.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32651 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-26 22:31:59 +00:00
Tommaso Cucinotta
569a0e4629 Fixed infinite loop on backwards search when matching in nested inset(s) at begin of document.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32650 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-26 22:10:14 +00:00
Tommaso Cucinotta
378d32bc06 indentation fix.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32559 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-17 07:57:50 +00:00
Tommaso Cucinotta
ad0060454d Fix of bug ##6334 - now if you search for something not in the doc, it wraps around only once.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32558 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-17 07:53:20 +00:00
Richard Heck
c47c34b1c8 Fix typo.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31277 a592a061-630c-0410-9148-cb99ea01b6c8
2009-09-04 13:52:49 +00:00
Jürgen Spitzmüller
56fcb589ae stylistics
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31274 a592a061-630c-0410-9148-cb99ea01b6c8
2009-09-04 13:08:09 +00:00
Jürgen Spitzmüller
2509ff8236 stylistics.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31273 a592a061-630c-0410-9148-cb99ea01b6c8
2009-09-04 13:06:43 +00:00
Tommaso Cucinotta
50c6ba17e5 Fix of issue when searching at paragraph boundaries when non-ignoring format.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31201 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-22 16:06:19 +00:00
Uwe Stöhr
91854df691 lyxfind.cpp: this was accidentally removed in r31163
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31164 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-20 00:36:52 +00:00
Uwe Stöhr
8a35204454 lyxfind.cpp/h: make LyX compilable
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31163 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-20 00:28:34 +00:00
Tommaso Cucinotta
edd8e78612 First implementation of feature in bug #3696. Needs testing.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31156 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-19 22:55:38 +00:00
Tommaso Cucinotta
5b1e7027ba Fixed Find LyX with replace, in common use cases.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31141 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-19 15:14:28 +00:00
Pavel Sanda
4304901faf Add find debug level. Patch from Tommaso.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31092 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-17 14:39:00 +00:00
Pavel Sanda
3fa15cc0a0 Backward search. Next bits from Tommaso.
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg154007.html


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31085 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-17 08:08:21 +00:00
Pavel Sanda
e040bcebbf Next bits from Tommaso, part of bug #6139.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31081 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-17 07:06:01 +00:00
Vincent van Ravesteijn
a492f5d553 Fix warnings.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31061 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-15 20:03:41 +00:00
Pavel Sanda
ab36804b6c Fix searching bug #6139.
Patch by Tommaso.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31053 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-15 15:35:14 +00:00
Vincent van Ravesteijn
27a0ac410f Remove some unnecessary negated logic.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30864 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-04 22:44:23 +00:00
Abdelrazak Younes
b8e5440bef LFUN_WORD_REPLACE: Invert replacement and searched strings in the FuncRequest argument. This is to allow replacement of current word even if it is not selected.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30360 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-04 23:02:27 +00:00
Abdelrazak Younes
73b48c22e5 Squash gcc warnings.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29560 a592a061-630c-0410-9148-cb99ea01b6c8
2009-05-07 12:40:35 +00:00
Vincent van Ravesteijn
6643fac7db Fix a small bug in the finding of changes. If a change starts at pos==1 and one tries to find it backwards, the character at pos==0 was also selected as part of the change.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29251 a592a061-630c-0410-9148-cb99ea01b6c8
2009-04-15 22:09:27 +00:00
Vincent van Ravesteijn
67503f8fe1 Fix the bug that when pressing the merge button while in the middle of a change, only half of the change was found.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29250 a592a061-630c-0410-9148-cb99ea01b6c8
2009-04-15 22:07:59 +00:00
Vincent van Ravesteijn
326a035a5b Fix bug #2213 (part 5): GuiChanges lacks "Previous Change" button.
Make sure we jump to the next or previous change when we switch search direction. Without this patch, the same Change will be found and only the cursor is moved from the end (or begin) to the begin (or end) of the selection.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29115 a592a061-630c-0410-9148-cb99ea01b6c8
2009-04-05 20:16:32 +00:00
Vincent van Ravesteijn
5a1dc72483 Fix bug #2213 (part 1): GuiChanges lacks "Previous Change" button.
*lyxfind: Add findPreviousChange().

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29108 a592a061-630c-0410-9148-cb99ea01b6c8
2009-04-05 19:11:25 +00:00
Pavel Sanda
82883a05f4 FindAdvSearch. Next patch from Tommaso.
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg147338.html


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28163 a592a061-630c-0410-9148-cb99ea01b6c8
2009-01-14 15:34:56 +00:00
Pavel Sanda
fd6679bd34 AdvSearch - next patch from Tommaso.
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg146966.html


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27938 a592a061-630c-0410-9148-cb99ea01b6c8
2008-12-20 16:00:47 +00:00
Uwe Stöhr
74abd44fb1 lyxfind.cpp: fix spacing
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27800 a592a061-630c-0410-9148-cb99ea01b6c8
2008-12-07 17:18:30 +00:00
André Pönitz
6192345f60 add Buffer * member to DocIterator
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27603 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-17 11:46:07 +00:00
André Pönitz
f8f5a7b28d move updateLables to buffer
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27562 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-16 16:43:49 +00:00
André Pönitz
9a9528e86f cosmetics
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27543 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-16 13:48:30 +00:00
Abdelrazak Younes
4209cbc631 Tommaso patch, part 5, lots of thing to cleanup still but I'll do that afterwards.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27521 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-16 00:12:21 +00:00
Abdelrazak Younes
c5e56fea32 First part of Tommaso advanced search patch. Only the backend function.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27514 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-15 23:30:27 +00:00
André Pönitz
f1cba8ff64 more latin1..utf8 schanges. all of src/* should be utf8 now
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27425 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-14 15:58:50 +00:00
Abdelrazak Younes
db062da6cb revert hazardous part of r26957 and add a comment, take 3.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27171 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-28 18:00:21 +00:00
Jean-Marc Lasgouttes
754ead5010 Fix bug 5310: http://bugzilla.lyx.org/show_bug.cgi?id=5310
* BufferView.cpp (dispatch): make sure to repaint the document after
	jumping to a new change.
	* lyxfind.cpp (findNextChange): do not ignore the last character when 
	a change extends to the end of an inset.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27083 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-24 15:46:44 +00:00