- Fix erroneous #ifdef that resulted in the -d/--rebinddelete
and -k/--cut options' not being printed when NANO_SMALL was
defined. (DLR)
+ find_paragraph()
+ - Fix problem where a search for the next paragraph would skip
+ over certain cases of one-line paragraphs. (DLR)
do_justify()
- Instead of breaking a line at a space and readding the space
afterwards, just break the line after the space, as it's more
/* Find the first line of the current or next paragraph. First, if
* the current line isn't in a paragraph, move forward to the line
- * after the end of the next paragraph. If we end up on the same
- * line, or the line before that isn't in a paragraph, it means that
- * there aren't any paragraphs left, so get out. Otherwise, if the
- * current line is in a paragraph and it isn't the first line of
- * that paragraph, move back to the first line. */
+ * after the last line of the next paragraph. If we end up on the
+ * same line, or the line before that isn't in a paragraph, it means
+ * that there aren't any paragraphs left, so get out. Otherwise,
+ * move back to the last line of the paragraph. If the current line
+ * is in a paragraph and it isn't the first line of that paragraph,
+ * move back to the first line. */
if (!inpar(current)) {
filestruct *current_save = current;
do_para_end(FALSE);
if (current == current_save || !inpar(current->prev))
return FALSE;
+ if (current->prev != NULL)
+ current = current->prev;
}
if (!begpar(current))
do_para_begin(FALSE);