mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 11:16:55 +00:00
Fixed S&R functions with insets.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2497 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
f5394fd982
commit
9f3dd22dd3
@ -2,6 +2,8 @@
|
||||
|
||||
* lyxfind.C (LyXReplace): fixed not single-replacing characters with
|
||||
casesensitive off.
|
||||
(SearchBackward): comment out the unlocking of the inset_owner this
|
||||
should not be needed!
|
||||
|
||||
2001-08-11 Dekel Tsur <dekelts@tau.ac.il>
|
||||
|
||||
|
@ -1,8 +1,12 @@
|
||||
2001-08-13 Juergen Vigna <jug@sad.it>
|
||||
|
||||
* insetcollapsable.C (edit): don't recollapse an already open inset.
|
||||
|
||||
* insettext.C: fixed problem when reinitializing LyXText by not doing
|
||||
it while lt is in use and post this to the next possible time in
|
||||
getLyXText().
|
||||
(searchForward): fixed not unlocking of inset if nothing found.
|
||||
(edit): set cursor behind right (was set -1 pos).
|
||||
|
||||
* insetert.C (InsetERT): init status_ also in the 3rd constructor.
|
||||
|
||||
|
@ -238,6 +238,9 @@ void InsetCollapsable::edit(BufferView * bv, int xp, int yp,
|
||||
|
||||
if (collapsed_) {
|
||||
collapsed_ = false;
|
||||
// set this only here as it should be recollapsed only if
|
||||
// it was already collapsed!
|
||||
first_after_edit = true;
|
||||
if (!bv->lockInset(this))
|
||||
return;
|
||||
bv->updateInset(this, true);
|
||||
@ -256,7 +259,6 @@ void InsetCollapsable::edit(BufferView * bv, int xp, int yp,
|
||||
inset.edit(bv, xp, yy, button);
|
||||
}
|
||||
}
|
||||
first_after_edit = true;
|
||||
}
|
||||
|
||||
|
||||
|
@ -708,8 +708,8 @@ void InsetText::edit(BufferView * bv, bool front)
|
||||
Paragraph * p = par;
|
||||
while(p->next())
|
||||
p = p->next();
|
||||
int const pos = (p->size() ? p->size()-1 : p->size());
|
||||
lt->setCursor(bv, p, pos);
|
||||
// int const pos = (p->size() ? p->size()-1 : p->size());
|
||||
lt->setCursor(bv, p, p->size());
|
||||
}
|
||||
lt->clearSelection();
|
||||
finishUndo();
|
||||
@ -2272,6 +2272,8 @@ bool InsetText::searchForward(BufferView * bv, string const & str,
|
||||
if (!lpar) {
|
||||
if (clear)
|
||||
lt = 0;
|
||||
// we have to unlock ourself in this function by default!
|
||||
bv->unlockInset(const_cast<InsetText *>(this));
|
||||
return false;
|
||||
}
|
||||
lt->setCursor(bv, lpar, pos);
|
||||
|
@ -311,7 +311,9 @@ SearchResult SearchBackward(BufferView * bv, LyXText * text,
|
||||
if (par) {
|
||||
text->setCursor(bv, par, pos);
|
||||
return SR_FOUND;
|
||||
} else if (text->inset_owner) {
|
||||
}
|
||||
#if 0
|
||||
else if (text->inset_owner) {
|
||||
// test if we're inside an inset if yes unlock the inset
|
||||
// and recall us with the outside LyXText!
|
||||
bv->unlockInset((UpdatableInset *)text->inset_owner);
|
||||
@ -319,6 +321,7 @@ SearchResult SearchBackward(BufferView * bv, LyXText * text,
|
||||
return SearchBackward(bv, bv->getLyXText(), str, cs, mw);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return SR_NOT_FOUND;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user