From: Dekel Tsur Date: Thu, 1 Feb 2001 21:32:14 +0000 (+0000) Subject: Preserve the font when erasing a newline char. X-Git-Tag: 1.6.10~21669 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=3f2bef26005259d5edbe4054872662356c1ba324;p=features.git Preserve the font when erasing a newline char. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1438 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/ChangeLog b/src/ChangeLog index defc66ccb5..90ebe67e58 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,9 @@ 2001-02-01 Dekel Tsur + * text.C (Backspace): Preserve the font when changing newline char + with a space. + (BreakParagraph): If the cursor is before a space, delete the space. + * lyx_cb.C (QuitLyX): Do not save files when running with no gui. 2001-01-31 Dekel Tsur diff --git a/src/text.C b/src/text.C index 002d7c7ed6..8bae8d4abc 100644 --- a/src/text.C +++ b/src/text.C @@ -1749,11 +1749,14 @@ void LyXText::BreakParagraph(BufferView * bview, char keep_layout) #endif ); - // please break always behind a space + // Always break behind a space + // + // It is better to erase the space (Dekel) if (cursor.pos() < cursor.par()->Last() && cursor.par()->IsLineSeparator(cursor.pos())) - cursor.pos(cursor.pos() + 1); - + cursor.par()->Erase(cursor.pos()); + // cursor.pos(cursor.pos() + 1); + // break the paragraph if (keep_layout) keep_layout = 2; @@ -2883,6 +2886,8 @@ void LyXText::Backspace(BufferView * bview) if (cursor.pos() < cursor.par()->Last() && !cursor.par()->IsSeparator(cursor.pos())) { cursor.par()->InsertChar(cursor.pos(), ' '); + SetCharFont(bview->buffer(), cursor.par(), + cursor.pos(), current_font); // refresh the positions tmprow = row; while (tmprow->next() && tmprow->next()->par() == row->par()) {