mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 21:21:32 +00:00
Fix semantics of Replace in Find & Replace dialog
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2711 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
bb6f1f7c41
commit
8e92d36142
@ -1,3 +1,9 @@
|
||||
2001-09-07 Angus Leeming <a.leeming@ic.ac.uk>
|
||||
|
||||
* ControlSearch (replace): change semantics of replace to NOT move on
|
||||
to the next instance of a word once the present instance has been
|
||||
replaced unless we are replacing ALL instances of the word.
|
||||
|
||||
2001-09-07 Rob Lahaye <lahaye@users.sourceforge.net>
|
||||
|
||||
* ControlButtons.[Ch]: added publicly accessible IconifyWithMain method.
|
||||
|
@ -58,9 +58,13 @@ void ControlSearch::find(string const & search,
|
||||
void ControlSearch::replace(string const & search, string const & replace,
|
||||
bool casesensitive, bool matchword, bool all) const
|
||||
{
|
||||
// If not replacing all instances of the word, then do not
|
||||
// move on to the next instance once the present instance has been
|
||||
// changed
|
||||
bool const once = !all;
|
||||
int const replace_count = LyXReplace(lv_.view(),
|
||||
search, replace, true, casesensitive,
|
||||
matchword, all);
|
||||
matchword, all, once);
|
||||
|
||||
if (replace_count == 0) {
|
||||
setMinibuffer(&lv_, _("String not found!"));
|
||||
|
Loading…
Reference in New Issue
Block a user