]> git.lyx.org Git - features.git/blobdiff - src/paragraph.C
Fix part of the line-delete-forward problem
[features.git] / src / paragraph.C
index 8e3c383f179c90cb944b2b2cb0540abb18746d8e..11ca5d39a143e758c159d13aa4ac566064fdf1cd 100644 (file)
@@ -1489,6 +1489,22 @@ LyXParagraph * LyXParagraph::FirstSelfrowPar()
                return tmppar;
 }
 
+int LyXParagraph::StripLeadingSpaces(LyXTextClassList::size_type tclass) 
+{
+       if (textclasslist.Style(tclass, GetLayout()).free_spacing)
+               return 0;
+       
+       int i = 0;
+       if (!IsDummy() && !table){
+               while (Last()
+                      && (IsNewline(0) || IsLineSeparator(0))){
+                       Erase(0);
+                       ++i;
+               }
+       }
+       return i;
+}
+
 
 LyXParagraph * LyXParagraph::Clone() const
 {