mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
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:
parent
ff67bee117
commit
5e8b74091e
@ -1035,7 +1035,7 @@ void BufferView::Pimpl::update(LyXText * text, BufferView::UpdateCodes f)
|
|||||||
text->FullRebreak(bv_);
|
text->FullRebreak(bv_);
|
||||||
|
|
||||||
if (text->inset_owner) {
|
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);
|
bv_->updateInset(text->inset_owner, true);
|
||||||
} else
|
} else
|
||||||
update();
|
update();
|
||||||
|
@ -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>
|
2001-02-20 Juergen Vigna <jug@sad.it>
|
||||||
|
|
||||||
* text2.C (ClearSelection): added BufferView param for inset_owner call
|
* text2.C (ClearSelection): added BufferView param for inset_owner call
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
2001-02-22 Juergen Vigna <jug@sad.it>
|
2001-02-22 Juergen Vigna <jug@sad.it>
|
||||||
|
|
||||||
* insettext.C (getLyXText): honor the recursive parameter.
|
* 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.
|
* inset.C (getLyXText): added bool recursive parameter.
|
||||||
|
|
||||||
|
@ -451,6 +451,9 @@ void InsetText::SetUpdateStatus(BufferView * bv, int what)
|
|||||||
need_update |= what;
|
need_update |= what;
|
||||||
if (TEXT(bv)->status == LyXText::NEED_MORE_REFRESH)
|
if (TEXT(bv)->status == LyXText::NEED_MORE_REFRESH)
|
||||||
need_update |= FULL;
|
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!
|
// this to not draw a selection when we redraw all of it!
|
||||||
if ((need_update & (INIT|FULL)) && (need_update & CURSOR))
|
if ((need_update & (INIT|FULL)) && (need_update & CURSOR))
|
||||||
TEXT(bv)->ClearSelection(bv);
|
TEXT(bv)->ClearSelection(bv);
|
||||||
|
@ -2828,21 +2828,20 @@ string const LyXFunc::Dispatch(int ac,
|
|||||||
|
|
||||||
case LFUN_SELFINSERT:
|
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) {
|
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
|
// This needs to be in the loop, or else we
|
||||||
// won't break lines correctly. (Asger)
|
// won't break lines correctly. (Asger)
|
||||||
owner->view()->update(TEXT(),
|
owner->view()->update(TEXT(false),
|
||||||
BufferView::SELECT|BufferView::FITCUR|BufferView::CHANGE);
|
BufferView::SELECT|BufferView::FITCUR|BufferView::CHANGE);
|
||||||
}
|
}
|
||||||
TEXT()->sel_cursor =
|
TEXT(false)->sel_cursor = TEXT(false)->cursor;
|
||||||
TEXT()->cursor;
|
moveCursorUpdate(false, false);
|
||||||
moveCursorUpdate(true, false);
|
|
||||||
|
|
||||||
// real_current_font.number can change so we need to
|
// real_current_font.number can change so we need to
|
||||||
// update the minibuffer
|
// update the minibuffer
|
||||||
if (old_font != TEXT()->real_current_font)
|
if (old_font != TEXT(false)->real_current_font)
|
||||||
owner->showState();
|
owner->showState();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user