more formatting fixes

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2147 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
master
David Lawrence Ramsey 2004-11-27 21:10:11 +00:00
parent 800ee0d3f9
commit 40a6c8cb64
4 changed files with 15 additions and 15 deletions

View File

@ -1252,8 +1252,8 @@ void do_delete(void)
/* Do we have to call edit_refresh(), or can we get away with /* Do we have to call edit_refresh(), or can we get away with
* update_line()? */ * update_line()? */
assert(current != NULL && current->data != NULL && current_x <= assert(current != NULL && current->data != NULL &&
strlen(current->data)); current_x <= strlen(current->data));
placewewant = xplustabs(); placewewant = xplustabs();
@ -1531,8 +1531,8 @@ bool do_wrap(filestruct *inptr)
word_back = i; word_back = i;
/* If we have found a legal wrap point and the current word /* If we have found a legal wrap point and the current word
* extends too far, then we stop. */ * extends too far, then we stop. */
if (wrap_loc != -1 && strnlenpt(inptr->data, word_back + 1) > if (wrap_loc != -1 &&
fill) strnlenpt(inptr->data, word_back + 1) > fill)
break; break;
/* We record the latest legal wrap point. */ /* We record the latest legal wrap point. */
if (word_back != i && !isblank(wrap_line[1])) if (word_back != i && !isblank(wrap_line[1]))
@ -2893,8 +2893,8 @@ void do_justify(bool full_justify)
#endif #endif
} }
#ifndef NANO_SMALL #ifndef NANO_SMALL
if (mark_beginbuf == current && mark_beginx > if (mark_beginbuf == current &&
break_pos) { mark_beginx > break_pos) {
mark_beginbuf = current->next; mark_beginbuf = current->next;
mark_beginx -= break_pos + 1 - indent_len; mark_beginx -= break_pos + 1 - indent_len;
} }

View File

@ -584,8 +584,8 @@ int replace_regexp(char *string, bool create_flag)
while (*c != '\0') { while (*c != '\0') {
int num = (int)(*(c + 1) - '0'); int num = (int)(*(c + 1) - '0');
if (*c != '\\' || num < 1 || num > 9 || num > if (*c != '\\' || num < 1 || num > 9 ||
search_regexp.re_nsub) { num > search_regexp.re_nsub) {
if (create_flag) if (create_flag)
*string++ = *c; *string++ = *c;
c++; c++;
@ -790,8 +790,8 @@ ssize_t do_replace_loop(const char *needle, const filestruct
* the top of it, don't change mark_beginx. */ * the top of it, don't change mark_beginx. */
if (!old_mark_set || !right_side_up) { if (!old_mark_set || !right_side_up) {
/* Keep mark_beginx in sync with the text changes. */ /* Keep mark_beginx in sync with the text changes. */
if (current == mark_beginbuf && mark_beginx > if (current == mark_beginbuf &&
current_x) { mark_beginx > current_x) {
if (mark_beginx < current_x + match_len) if (mark_beginx < current_x + match_len)
mark_beginx = current_x; mark_beginx = current_x;
else else
@ -804,8 +804,8 @@ ssize_t do_replace_loop(const char *needle, const filestruct
if (!old_mark_set || right_side_up) { if (!old_mark_set || right_side_up) {
#endif #endif
/* Keep real_current_x in sync with the text changes. */ /* Keep real_current_x in sync with the text changes. */
if (current == real_current && current_x <= if (current == real_current &&
*real_current_x) { current_x <= *real_current_x) {
if (*real_current_x < current_x + match_len) if (*real_current_x < current_x + match_len)
*real_current_x = current_x + match_len; *real_current_x = current_x + match_len;
*real_current_x += length_change; *real_current_x += length_change;

View File

@ -467,7 +467,7 @@ void mark_order(const filestruct **top, size_t *top_x, const filestruct
assert(top != NULL && top_x != NULL && bot != NULL && bot_x != NULL); assert(top != NULL && top_x != NULL && bot != NULL && bot_x != NULL);
if ((current->lineno == mark_beginbuf->lineno && current_x > if ((current->lineno == mark_beginbuf->lineno && current_x >
mark_beginx) || current->lineno > mark_beginbuf->lineno) { mark_beginx) || current->lineno > mark_beginbuf->lineno) {
*top = mark_beginbuf; *top = mark_beginbuf;
*top_x = mark_beginx; *top_x = mark_beginx;
*bot = current; *bot = current;

View File

@ -1310,8 +1310,8 @@ int get_untranslated_kbinput(int kbinput, size_t position, bool
* the first digit), increment the ASCII digit counter and * the first digit), increment the ASCII digit counter and
* interpret the digit. If the digit sequence's range is not * interpret the digit. If the digit sequence's range is not
* limited to 2XX, fall through. */ * limited to 2XX, fall through. */
if (position == ascii_digits && kbinput >= '0' && kbinput <= if (position == ascii_digits && kbinput >= '0' &&
'9') { kbinput <= '9') {
if (kbinput <= '2' || ascii_digits > 0) { if (kbinput <= '2' || ascii_digits > 0) {
ascii_digits++; ascii_digits++;
kbinput = get_ascii_kbinput(kbinput, ascii_digits kbinput = get_ascii_kbinput(kbinput, ascii_digits