From: Vincent van Ravesteijn Date: Wed, 9 Sep 2009 04:58:48 +0000 (+0000) Subject: Remove other explicit tests for an internal buffer. X-Git-Tag: 2.0.0~5521 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=b67bf24d183c78ea47187b24b91fc71f051090f0;p=features.git Remove other explicit tests for an internal buffer. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31356 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/BufferView.cpp b/src/BufferView.cpp index 1833053ef9..7b1b778dd6 100644 --- a/src/BufferView.cpp +++ b/src/BufferView.cpp @@ -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;