On Mon, May 07, 2001 at 01:56:42PM +0200, Lars Gullik Bjønnes wrote: > Can't you move it here? Yes, I could. One more time... ;-)
Index: src/ChangeLog =================================================================== RCS file: /cvs/lyx/lyx-devel/src/ChangeLog,v retrieving revision 1.157 diff -u -r1.157 ChangeLog --- src/ChangeLog 2001/05/04 10:36:34 1.157 +++ src/ChangeLog 2001/05/07 15:12:26 @@ -1,3 +1,9 @@ +2001-05-04 Kayvan A. Sylvan <[EMAIL PROTECTED]> + + * text.C (InsertChar): Added trivial patch to only send the "you + can not do multiple spaces this way" message once during a + session. + 2001-05-04 Lars Gullik Bjønnes <[EMAIL PROTECTED]> * minibuffer.C (peek_event): temporarily reduce the functionality Index: src/text.C =================================================================== RCS file: /cvs/lyx/lyx-devel/src/text.C,v retrieving revision 1.147 diff -u -r1.147 text.C --- src/text.C 2001/05/03 14:31:31 1.147 +++ src/text.C 2001/05/07 15:12:27 @@ -1778,10 +1778,14 @@ || (cursor.pos() > 0 && cursor.par()->IsNewline(cursor.pos() - 1)) || (cursor.pos() == 0)) { - if (cursor.pos() == 0 ) - bview->owner()->message(_("You cannot insert a space at the beginning of a paragraph. Please read the Tutorial.")); - else - bview->owner()->message(_("You cannot type two spaces this way. Please read the Tutorial.")); + static bool sent_space_message = false; + if (cursor.pos() == 0) { + if (!sent_space_message) +bview->owner()->message(_("You cannot insert a space at the beginning of a paragraph. + Please read the Tutorial.")); + sent_space_message = true; + } else { + if (!sent_space_message) +bview->owner()->message(_("You cannot type two spaces this way. Please read the +Tutorial.")); + sent_space_message = true; + } charInserted(); return; }