]> git.lyx.org Git - features.git/commitdiff
Fixed SELF_INSERT for InsetText!
authorJürgen Vigna <jug@sad.it>
Thu, 22 Feb 2001 14:33:08 +0000 (14:33 +0000)
committerJürgen Vigna <jug@sad.it>
Thu, 22 Feb 2001 14:33:08 +0000 (14:33 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1600 a592a061-630c-0410-9148-cb99ea01b6c8

src/BufferView_pimpl.C
src/ChangeLog
src/insets/ChangeLog
src/insets/insettext.C
src/lyxfunc.C

index cb1048ff52043f0e4fe8efe7b7c9d1575d2b92ce..6bbd7838f36962b45d726432a3e3c14e2788c003 100644 (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();
index 5deb135d63e7d998cd6f1104c595cfe43487f272..4ba8e35257a1fd737791fdd42bbe822a9506888d 100644 (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
index 236d75be33a90e01d52f8c3a7d7f6a0c57423575..7b4d58ee99383ed9ead5499ebac1e6fc741de7a4 100644 (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.
 
index da82a432cb0d425b5311e81a883611d3c800e211..aec6572950ceb7c1b1447220d0fdcf809a889a9e 100644 (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);
index 8449d40b65ec25c7fab1661ec686f42752aebe78..3e4ea34e7a6964258cc9652658699d0b041524fd 100644 (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;