mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
Fix bug 6650: Error Messages Repeated
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35664 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
5520817bd3
commit
496f7a23fd
@ -332,6 +332,7 @@ void Cursor::dispatch(FuncRequest const & cmd0)
|
||||
fixIfBroken();
|
||||
FuncRequest cmd = cmd0;
|
||||
Cursor safe = *this;
|
||||
disp_ = DispatchResult();
|
||||
|
||||
buffer()->undo().beginUndoGroup();
|
||||
|
||||
|
20
src/Text.cpp
20
src/Text.cpp
@ -936,23 +936,17 @@ void Text::insertChar(Cursor & cur, char_type c)
|
||||
// disable the double-space checking
|
||||
if (!freeSpacing && isLineSeparatorChar(c)) {
|
||||
if (cur.pos() == 0) {
|
||||
static bool sent_space_message = false;
|
||||
if (!sent_space_message) {
|
||||
cur.message(_("You cannot insert a space at the "
|
||||
"beginning of a paragraph. Please read the Tutorial."));
|
||||
sent_space_message = true;
|
||||
}
|
||||
cur.message(_(
|
||||
"You cannot insert a space at the "
|
||||
"beginning of a paragraph. Please read the Tutorial."));
|
||||
return;
|
||||
}
|
||||
LASSERT(cur.pos() > 0, /**/);
|
||||
if ((par.isLineSeparator(cur.pos() - 1) || par.isNewline(cur.pos() - 1))
|
||||
&& !par.isDeleted(cur.pos() - 1)) {
|
||||
static bool sent_space_message = false;
|
||||
if (!sent_space_message) {
|
||||
cur.message(_("You cannot type two spaces this way. "
|
||||
"Please read the Tutorial."));
|
||||
sent_space_message = true;
|
||||
}
|
||||
&& !par.isDeleted(cur.pos() - 1)) {
|
||||
cur.message(_(
|
||||
"You cannot type two spaces this way. "
|
||||
"Please read the Tutorial."));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user