Fixed SELF_INSERT for InsetText!

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1600 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Vigna 2001-02-22 14:33:08 +00:00
parent ff67bee117
commit 5e8b74091e
5 changed files with 16 additions and 8 deletions

View File

@ -1035,7 +1035,7 @@ void BufferView::Pimpl::update(LyXText * text, BufferView::UpdateCodes f)
text->FullRebreak(bv_);
if (text->inset_owner) {
// text->inset_owner->SetUpdateStatus(bv_, InsetText::CURSOR_PAR);
text->inset_owner->SetUpdateStatus(bv_, InsetText::NONE);
bv_->updateInset(text->inset_owner, true);
} else
update();

View File

@ -1,3 +1,8 @@
2001-02-22 Juergen Vigna <jug@sad.it>
* BufferView_pimpl.C (update): call a status update to see if LyXText
needs it.
2001-02-20 Juergen Vigna <jug@sad.it>
* text2.C (ClearSelection): added BufferView param for inset_owner call

View File

@ -1,6 +1,7 @@
2001-02-22 Juergen Vigna <jug@sad.it>
* insettext.C (getLyXText): honor the recursive parameter.
(SetUpdateStatus): set need_update to CURSOR_PAR if LyXText needs it.
* inset.C (getLyXText): added bool recursive parameter.

View File

@ -451,6 +451,9 @@ void InsetText::SetUpdateStatus(BufferView * bv, int what)
need_update |= what;
if (TEXT(bv)->status == LyXText::NEED_MORE_REFRESH)
need_update |= FULL;
else if (TEXT(bv)->status == LyXText::NEED_VERY_LITTLE_REFRESH)
need_update |= CURSOR_PAR;
// this to not draw a selection when we redraw all of it!
if ((need_update & (INIT|FULL)) && (need_update & CURSOR))
TEXT(bv)->ClearSelection(bv);

View File

@ -2828,21 +2828,20 @@ string const LyXFunc::Dispatch(int ac,
case LFUN_SELFINSERT:
{
LyXFont const old_font(TEXT()->real_current_font);
LyXFont const old_font(TEXT(false)->real_current_font);
for (string::size_type i = 0; i < argument.length(); ++i) {
TEXT()->InsertChar(owner->view(), argument[i]);
TEXT(false)->InsertChar(owner->view(), argument[i]);
// This needs to be in the loop, or else we
// won't break lines correctly. (Asger)
owner->view()->update(TEXT(),
owner->view()->update(TEXT(false),
BufferView::SELECT|BufferView::FITCUR|BufferView::CHANGE);
}
TEXT()->sel_cursor =
TEXT()->cursor;
moveCursorUpdate(true, false);
TEXT(false)->sel_cursor = TEXT(false)->cursor;
moveCursorUpdate(false, false);
// real_current_font.number can change so we need to
// update the minibuffer
if (old_font != TEXT()->real_current_font)
if (old_font != TEXT(false)->real_current_font)
owner->showState();
}
break;