Adjusting some whitespace and wrapping.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5164 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
Этот коммит содержится в:
родитель
41580848e3
Коммит
ad827a6aef
@ -2,6 +2,7 @@
|
|||||||
* doc/syntax/patch.nanorc: Recognize also Debian package diffs.
|
* doc/syntax/patch.nanorc: Recognize also Debian package diffs.
|
||||||
Fixes https://bugs.launchpad.net/ubuntu/+source/nano/+bug/1300565
|
Fixes https://bugs.launchpad.net/ubuntu/+source/nano/+bug/1300565
|
||||||
requested by Rolf Leggewie.
|
requested by Rolf Leggewie.
|
||||||
|
* src/search.c (do_replace_loop): Adjust some whitespace and wrapping.
|
||||||
|
|
||||||
2015-03-25 Benno Schulenberg <bensberg@justemail.net>
|
2015-03-25 Benno Schulenberg <bensberg@justemail.net>
|
||||||
* doc/syntax/debian.nanorc: Slightly widen and relax the header regex.
|
* doc/syntax/debian.nanorc: Slightly widen and relax the header regex.
|
||||||
|
17
src/search.c
17
src/search.c
@ -784,8 +784,7 @@ ssize_t do_replace_loop(
|
|||||||
#ifdef HAVE_REGEX_H
|
#ifdef HAVE_REGEX_H
|
||||||
/* Set the bol_or_eol flag if we're doing a bol and/or eol regex
|
/* Set the bol_or_eol flag if we're doing a bol and/or eol regex
|
||||||
* replace ("^", "$", or "^$"). */
|
* replace ("^", "$", or "^$"). */
|
||||||
if (ISSET(USE_REGEXP) && regexp_bol_or_eol(&search_regexp,
|
if (ISSET(USE_REGEXP) && regexp_bol_or_eol(&search_regexp, needle))
|
||||||
needle))
|
|
||||||
bol_or_eol = TRUE;
|
bol_or_eol = TRUE;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -801,8 +800,7 @@ ssize_t do_replace_loop(
|
|||||||
|
|
||||||
copy = replace_line(needle);
|
copy = replace_line(needle);
|
||||||
|
|
||||||
length_change = strlen(copy) -
|
length_change = strlen(copy) - strlen(openfile->current->data);
|
||||||
strlen(openfile->current->data);
|
|
||||||
|
|
||||||
#ifndef NANO_TINY
|
#ifndef NANO_TINY
|
||||||
/* If the mark was on and (mark_begin, mark_begin_x) was the
|
/* If the mark was on and (mark_begin, mark_begin_x) was the
|
||||||
@ -826,10 +824,8 @@ ssize_t do_replace_loop(
|
|||||||
/* Keep real_current_x in sync with the text changes. */
|
/* Keep real_current_x in sync with the text changes. */
|
||||||
if (openfile->current == real_current &&
|
if (openfile->current == real_current &&
|
||||||
openfile->current_x <= *real_current_x) {
|
openfile->current_x <= *real_current_x) {
|
||||||
if (*real_current_x <
|
if (*real_current_x < openfile->current_x + match_len)
|
||||||
openfile->current_x + match_len)
|
*real_current_x = openfile->current_x + match_len;
|
||||||
*real_current_x = openfile->current_x +
|
|
||||||
match_len;
|
|
||||||
*real_current_x += length_change;
|
*real_current_x += length_change;
|
||||||
}
|
}
|
||||||
#ifndef NANO_TINY
|
#ifndef NANO_TINY
|
||||||
@ -852,9 +848,10 @@ ssize_t do_replace_loop(
|
|||||||
openfile->current->data = copy;
|
openfile->current->data = copy;
|
||||||
|
|
||||||
#ifndef DISABLE_COLOR
|
#ifndef DISABLE_COLOR
|
||||||
reset_multis(openfile->current, TRUE);
|
reset_multis(openfile->current, TRUE);
|
||||||
#endif
|
#endif
|
||||||
edit_refresh();
|
edit_refresh();
|
||||||
|
|
||||||
if (!replaceall) {
|
if (!replaceall) {
|
||||||
#ifndef DISABLE_COLOR
|
#ifndef DISABLE_COLOR
|
||||||
/* If color syntaxes are available and turned on, we
|
/* If color syntaxes are available and turned on, we
|
||||||
|
Загрузка…
Ссылка в новой задаче
Block a user