]> git.lyx.org Git - features.git/commitdiff
Did I fix it?
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 28 Mar 2000 02:18:52 +0000 (02:18 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 28 Mar 2000 02:18:52 +0000 (02:18 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@631 a592a061-630c-0410-9148-cb99ea01b6c8

src/text.C

index c81fae1f9b3af9e3315795c7f73349b769992667..5f2b1b67e589372f2ffa1061147fd18e6df1a5f1 100644 (file)
@@ -3377,9 +3377,23 @@ void LyXText::Backspace()
                                cursor.par->ParFromPos(cursor.pos)->next);
                }
                
-               LyXParagraph * tmppar = cursor.par;
-               Row * tmprow = cursor.row;
-               CursorLeftIntern();
+               LyXParagraph * tmppar = cursor.par;
+               Row * tmprow = cursor.row;
+
+               // We used to do CursorLeftIntern() here, but it is
+               // not a good idea since it triggers the auto-delete
+               // mechanism. So we do a CursorLeftIntern()-lite,
+               // without the dreaded mechanism. (JMarc)
+               if (cursor.pos > 0) {
+                       SetCursorIntern(cursor.par, cursor.pos - 1);
+               }
+               else if (cursor.par->Previous()) { 
+                       // steps into the above paragraph.
+                       SetCursorIntern(cursor.par->Previous(), 
+                                       cursor.par->Previous()->Last());
+               }
+
+
 #warning See comment on top of text.C
                /* Pasting is not allowed, if the paragraphs have different
                   layout. I think it is a real bug of all other