]> git.lyx.org Git - features.git/commitdiff
Remove other explicit tests for an internal buffer.
authorVincent van Ravesteijn <vfr@lyx.org>
Wed, 9 Sep 2009 04:58:48 +0000 (04:58 +0000)
committerVincent van Ravesteijn <vfr@lyx.org>
Wed, 9 Sep 2009 04:58:48 +0000 (04:58 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31356 a592a061-630c-0410-9148-cb99ea01b6c8

src/BufferView.cpp

index 1833053ef902925d3c35fc8da818e427ea16d9ad..7b1b778dd62cc4f6539714753ebd2cdec39ce364 100644 (file)
@@ -938,13 +938,10 @@ bool BufferView::getStatus(FuncRequest const & cmd, FuncStatus & flag)
                flag.setEnabled(true);
                break;
 
-       // @todo Test if current WorkArea is the search WorkArea
-       case LFUN_REGEXP_MODE: {
-               bool const embedded_workarea = buffer().isUnnamed()
-                       && buffer().fileName().extension() == "internal";
-               flag.setEnabled(embedded_workarea && !cur.inRegexped());
+       case LFUN_REGEXP_MODE:
+               // FIXME: Test if current WorkArea is the search WorkArea
+               flag.setEnabled(buffer().isInternal() && !cur.inRegexped());
                break;
-       }
 
        case LFUN_LABEL_COPY_AS_REF: {
                // if there is an inset at cursor, see whether it
@@ -2344,10 +2341,8 @@ void BufferView::draw(frontend::Painter & pain)
                int const y2 = lastpm.second->position() + lastpm.second->descent();
                
                if (y2 < height_) {
-                       bool const embedded_workarea = buffer().isUnnamed()
-                                 && buffer().fileName().extension() == "internal";
-                       Color color = embedded_workarea ? Color_background
-                                 : Color_bottomarea;
+                       Color color = buffer().isInternal() 
+                               ? Color_background : Color_bottomarea;
                        pain.fillRectangle(0, y2, width_, height_ - y2, color);
                }
                break;