/* Here is the assumption about a_quote. */
assert(a_quote == quote_length(a_line));
- return a_quote == quote_length(b_line) &&
- strncmp(a_line, b_line, a_quote) == 0;
+ return (a_quote == quote_length(b_line) &&
+ strncmp(a_line, b_line, a_quote) == 0);
}
/* We assume a_line and b_line have no quote part. Then, we return
assert(a_indent == indent_length(a_line));
assert(b_indent == indent_length(b_line));
- return b_indent <= a_indent &&
- strncmp(a_line, b_line, b_indent) == 0;
+ return (b_indent <= a_indent &&
+ strncmp(a_line, b_line, b_indent) == 0);
}
/* Is foo the beginning of a paragraph?
#ifndef NANO_SMALL
bool old_mark_set = ISSET(MARK_ISSET);
int mbb_lineno_save = 0;
+ size_t mark_beginx_save = 0;
- if (old_mark_set)
+ if (old_mark_set) {
mbb_lineno_save = mark_beginbuf->lineno;
+ mark_beginx_save = mark_beginx;
+ }
#endif
/* Move bot down par_len lines to the newline after the last line of
if (top->lineno == current_lineno_save)
current = top;
#ifndef NANO_SMALL
- if (old_mark_set && top->lineno == mbb_lineno_save)
+ if (old_mark_set && top->lineno == mbb_lineno_save) {
mark_beginbuf = top;
+ mark_beginx = mark_beginx_save;
+ }
#endif
top = top->prev;
}
* loop so that we justify all the paragraphs in the file. */
if (!full_justify)
break;
- } /* while (TRUE) */
+ }
/* We are now done justifying the paragraph or the file, so clean
* up. totlines, totsize, and current_y have been maintained above.