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();
|
fixIfBroken();
|
||||||
FuncRequest cmd = cmd0;
|
FuncRequest cmd = cmd0;
|
||||||
Cursor safe = *this;
|
Cursor safe = *this;
|
||||||
|
disp_ = DispatchResult();
|
||||||
|
|
||||||
buffer()->undo().beginUndoGroup();
|
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
|
// disable the double-space checking
|
||||||
if (!freeSpacing && isLineSeparatorChar(c)) {
|
if (!freeSpacing && isLineSeparatorChar(c)) {
|
||||||
if (cur.pos() == 0) {
|
if (cur.pos() == 0) {
|
||||||
static bool sent_space_message = false;
|
cur.message(_(
|
||||||
if (!sent_space_message) {
|
"You cannot insert a space at the "
|
||||||
cur.message(_("You cannot insert a space at the "
|
"beginning of a paragraph. Please read the Tutorial."));
|
||||||
"beginning of a paragraph. Please read the Tutorial."));
|
|
||||||
sent_space_message = true;
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
LASSERT(cur.pos() > 0, /**/);
|
LASSERT(cur.pos() > 0, /**/);
|
||||||
if ((par.isLineSeparator(cur.pos() - 1) || par.isNewline(cur.pos() - 1))
|
if ((par.isLineSeparator(cur.pos() - 1) || par.isNewline(cur.pos() - 1))
|
||||||
&& !par.isDeleted(cur.pos() - 1)) {
|
&& !par.isDeleted(cur.pos() - 1)) {
|
||||||
static bool sent_space_message = false;
|
cur.message(_(
|
||||||
if (!sent_space_message) {
|
"You cannot type two spaces this way. "
|
||||||
cur.message(_("You cannot type two spaces this way. "
|
"Please read the Tutorial."));
|
||||||
"Please read the Tutorial."));
|
|
||||||
sent_space_message = true;
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user