* src/paragraph.C: stripLeadingSpaces(); return boolean indicating
whether any character has been deleted - either physically or logically
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16798
a592a061-630c-0410-9148-
cb99ea01b6c8
}
-int Paragraph::stripLeadingSpaces(bool trackChanges)
+bool Paragraph::stripLeadingSpaces(bool trackChanges)
{
if (isFreeSpacing())
return 0;
++pos;
}
- return count;
+ return count + pos > 0;
}
/// returns -1 if inset not found
int getPositionOfInset(InsetBase const * inset) const;
- /// Returns the number of line breaks and white-space stripped at the start
- int stripLeadingSpaces(bool trackChanges);
+ /// returns true if at least one line break or line separator has been deleted
+ /// at the beginning of the paragraph (either physically or logically)
+ bool stripLeadingSpaces(bool trackChanges);
/// return true if we allow multiple spaces
bool isFreeSpacing() const;