From 4d7fc5b6a9a6bdb98c43acf7ef24c81e9511f5cc Mon Sep 17 00:00:00 2001 From: Bo Peng Date: Tue, 15 Aug 2006 15:22:30 +0000 Subject: [PATCH] Fix bug 2768 (inset comment eats space after it) git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_4_X@14693 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/insets/ChangeLog | 4 ++++ src/insets/insetnote.C | 15 ++++++++++++++- status.14x | 2 ++ 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/src/insets/ChangeLog b/src/insets/ChangeLog index cbfa979fd8..103a531131 100644 --- a/src/insets/ChangeLog +++ b/src/insets/ChangeLog @@ -1,3 +1,7 @@ +2006-03-11 Bo Peng + + * insetnote.C: fix bug 2768 (comment/note eats space after it) + 2006-07-12 Martin Vermeer * insettabular.C (metrics): fix width of insets inside tabular diff --git a/src/insets/insetnote.C b/src/insets/insetnote.C index 884e95b207..b9426312d9 100644 --- a/src/insets/insetnote.C +++ b/src/insets/insetnote.C @@ -249,7 +249,20 @@ int InsetNote::latex(Buffer const & buf, ostream & os, ostringstream ss; ss << "%\n\\begin{" << type << "}\n"; InsetText::latex(buf, ss, runparams); - ss << "%\n\\end{" << type << "}\n"; + ss << "\n\\end{" << type << "}\n"; + // the space after the comment in 'a[comment] b' will be eaten by the + // comment environment since the space before b is ignored with the + // following latex output: + // + // a% + // \begin{comment} + // comment + // \end{comment} + // b + // + // Adding {} before ' b' fixes this. + if (params_.type == InsetNoteParams::Comment) + ss << "{}"; string const str = ss.str(); os << str; diff --git a/status.14x b/status.14x index c19eb2055c..d709f71066 100644 --- a/status.14x +++ b/status.14x @@ -52,6 +52,8 @@ What's new - Render greyed out notes correctly in output (bug 2723) +- Fix bug 2768 (inset comment/note eats space after it) + * User Interface: - Fix crash when using next-inset-toggle (Ctrl+I) inside mathed; make