mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-13 01:08:45 +00:00
* GuiSpellchecker.cpp: revert r33567 abd thereby fix bug #6708.
No status entry needed, since this was already fixed in 1.6.6.1. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@34567 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
e8bec59f63
commit
ae74ac9d4c
@ -20,7 +20,6 @@
|
|||||||
#include "BufferView.h"
|
#include "BufferView.h"
|
||||||
#include "Cursor.h"
|
#include "Cursor.h"
|
||||||
#include "CutAndPaste.h"
|
#include "CutAndPaste.h"
|
||||||
#include "FuncRequest.h"
|
|
||||||
#include "Language.h"
|
#include "Language.h"
|
||||||
#include "LyXRC.h"
|
#include "LyXRC.h"
|
||||||
#include "Paragraph.h"
|
#include "Paragraph.h"
|
||||||
@ -466,21 +465,16 @@ void GuiSpellchecker::replace(docstring const & replacement)
|
|||||||
{
|
{
|
||||||
LYXERR(Debug::GUI, "GuiSpellchecker::replace("
|
LYXERR(Debug::GUI, "GuiSpellchecker::replace("
|
||||||
<< to_utf8(replacement) << ")");
|
<< to_utf8(replacement) << ")");
|
||||||
/*
|
BufferView * bv = const_cast<BufferView *>(bufferview());
|
||||||
Slight hack ahead: we want to use the dispatch machinery
|
if (!bv->cursor().inTexted())
|
||||||
(see bug #6217), but self-insert honors the ``auto region
|
return;
|
||||||
delete'' setting, which is not wanted here. Creating a new
|
cap::replaceSelectionWithString(bv->cursor(), replacement, true);
|
||||||
ad-hoc LFUN seems overkill, but it could be an option (JMarc).
|
bv->buffer().markDirty();
|
||||||
*/
|
// If we used an LFUN, we would not need that
|
||||||
bool const ard = lyxrc.auto_region_delete;
|
bv->processUpdateFlags(Update::Force | Update::FitCursor);
|
||||||
lyxrc.auto_region_delete = true;
|
|
||||||
dispatch(FuncRequest(LFUN_SELF_INSERT, replacement));
|
|
||||||
lyxrc.auto_region_delete = ard;
|
|
||||||
// fix up the count
|
// fix up the count
|
||||||
--count_;
|
--count_;
|
||||||
// Do nothing if the spellchecker has been terminated already
|
check();
|
||||||
if (speller_)
|
|
||||||
check();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user