]> git.lyx.org Git - lyx.git/blobdiff - src/BufferView_pimpl.C
Added new FINISED states FINISHED_RIGHT, FINISHED_UP, FINISHED_DOWN.
[lyx.git] / src / BufferView_pimpl.C
index adac2acda212a2097f33d43f32cc5a23e4bcf702..d5d677604bc1c0ece3e9d1feb0432a92dc56c589 100644 (file)
@@ -889,7 +889,7 @@ Inset * BufferView::Pimpl::checkInsetHit(LyXText * text, int & x, int & y,
            (cursor.par()->getInset(cursor.pos() - 1)->editable())) {
                Inset * tmpinset = cursor.par()->getInset(cursor.pos()-1);
                LyXFont font = text->getFont(buffer_, cursor.par(),
-                                                 cursor.pos()-1);
+                                                 cursor.pos() - 1);
                int const width = tmpinset->width(bv_, font);
                int const inset_x = font.isVisibleRightToLeft()
                        ? cursor.x() : cursor.x() - width;
@@ -981,6 +981,9 @@ void BufferView::Pimpl::update()
                        bv_->text->status(bv_, st);
                        screen_->update(bv_->text, bv_);
                }
+               // do this here instead of in the screen::update because of
+               // the above loop!
+               bv_->text->status(bv_, LyXText::UNCHANGED);
                if (fitc)
                        fitCursor();
        }
@@ -1212,12 +1215,7 @@ void BufferView::Pimpl::setState()
                return;
 
        LyXText * text = bv_->getLyXText();
-       if (text->real_current_font.isRightToLeft()
-#ifndef NO_LATEX
-           &&
-           text->real_current_font.latex() != LyXFont::ON
-#endif
-               ) {
+       if (text->real_current_font.isRightToLeft()) {
                if (owner_->getIntl()->keymap == Intl::PRIMARY)
                        owner_->getIntl()->KeyMapSec();
        } else {
@@ -1599,14 +1597,6 @@ bool BufferView::Pimpl::Dispatch(kb_action action, string const & argument)
                owner_->getDialogs()->setUserFreeFont();
                break;
 
-#ifndef NO_LATEX
-       case LFUN_TEX:
-               Tex(bv_);
-               setState();
-               owner_->showState();
-               break;
-#endif
-               
        case LFUN_FILE_INSERT:
        {
                MenuInsertLyXFile(argument);
@@ -2363,7 +2353,7 @@ bool BufferView::Pimpl::Dispatch(kb_action action, string const & argument)
                        // just comment out the line below...
                        showCursor();
                } else {
-                       bv_->cut();
+                       bv_->cut(false);
                }
                moveCursorUpdate(false);
                owner_->showState();
@@ -2419,7 +2409,7 @@ bool BufferView::Pimpl::Dispatch(kb_action action, string const & argument)
                                       | BufferView::CHANGE);
                        }
                } else {
-                       bv_->cut();
+                       bv_->cut(false);
                }
        }
        break;
@@ -2506,7 +2496,7 @@ bool BufferView::Pimpl::Dispatch(kb_action action, string const & argument)
                                showCursor();
                        }
                } else {
-                       bv_->cut();
+                       bv_->cut(false);
                }
                owner_->showState();
                setState();
@@ -2546,7 +2536,7 @@ bool BufferView::Pimpl::Dispatch(kb_action action, string const & argument)
                                       | BufferView::CHANGE);
                        }
                } else
-                       bv_->cut();
+                       bv_->cut(false);
        }
        break;
 
@@ -2860,18 +2850,6 @@ bool BufferView::Pimpl::Dispatch(kb_action action, string const & argument)
        }
        break;
 
-       case LFUN_GETLATEX:
-       {
-#ifndef NO_LATEX
-               LyXFont & font = bv_->getLyXText()->current_font;
-                if (font.latex() == LyXFont::ON)
-                       owner_->getLyXFunc()->setMessage("L");
-                else
-#endif
-                       owner_->getLyXFunc()->setMessage("0");
-       }
-       break;
-
        // --- accented characters ---------------------------
                
        case LFUN_UMLAUT:
@@ -3125,7 +3103,7 @@ bool BufferView::Pimpl::Dispatch(kb_action action, string const & argument)
                
                if (lyxrc.auto_region_delete) {
                        if (lt->selection.set()) {
-                               lt->cutSelection(bv_, false);
+                               lt->cutSelection(bv_, false, false);
                                bv_->update(lt,
                                            BufferView::SELECT
                                            | BufferView::FITCUR
@@ -3363,9 +3341,6 @@ bool BufferView::Pimpl::insertInset(Inset * inset, string const & lout)
                                   string(),
                                   0);
                update(bv_->text, BufferView::SELECT|BufferView::FITCUR|BufferView::CHANGE);
-#ifndef NO_LATEX
-               bv_->text->current_font.setLatex(LyXFont::OFF);
-#endif
        }
        
        bv_->text->insertInset(bv_, inset);