I stumbled upon another one of those silly comparison tests but this
time I don't immediately see what should have been there.

text.C:1894-1902
        } else if (IsNewlineChar(c)) {
==>             if (cursor.par() == cursor.par()
                    && cursor.pos() <= beginningOfMainBody(bview->buffer(), 
cursor.par())) {
                        charInserted();
                        return;
                }
                /* No newline at first position
                 * of a paragraph or behind labels.
                 * TeX does not allow that. */

Then why do we say charInserted() when it wasn't?  Shouldn't we undo
the setUndo() call we did at the start of the function?

What I really want to do is stop people inserting "C-Enter" in a line
that only contains "Inset::autoDelete() == true" type insets (like
error boxes -- as this is the only remaining flaw in the revised
removeAutoInsets() code).

I'm thinking that deleteEmptyParagraphMechanism() should also try to
remove new lines (C-Enter) if possible rather than rely upon
redoParagraph() which only gets called if we just deleted a space.

Allan. (ARRae)

Reply via email to