]> git.lyx.org Git - features.git/commitdiff
#7379 avoid the wrap spell check question when buffer is empty
authorStephan Witt <switt@lyx.org>
Thu, 24 Mar 2011 11:49:34 +0000 (11:49 +0000)
committerStephan Witt <switt@lyx.org>
Thu, 24 Mar 2011 11:49:34 +0000 (11:49 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38023 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiSpellchecker.cpp

index a1818b10287b89f335f1165ebd807b1892746361..3497ad97c30eed28e9eec1013e9c599b1bb48eaa 100644 (file)
@@ -24,6 +24,7 @@
 #include "BufferView.h"
 #include "buffer_funcs.h"
 #include "Cursor.h"
+#include "Text.h"
 #include "CutAndPaste.h"
 #include "FuncRequest.h"
 #include "Language.h"
@@ -290,7 +291,7 @@ void SpellcheckerWidget::Private::updateSuggestions(docstring_list & words)
 void SpellcheckerWidget::Private::check()
 {
        BufferView * bv = gv_->documentBufferView();
-       if (!bv)
+       if (!bv || bv->buffer().text().empty())
                return;
 
        DocIterator from = bv->cursor();