in do_replace_loop(), when moving to the next match, update the screen
using edit_refresh() instead of edit_redraw(), as the latter won't work properly when we've replaced one or more instances of a string in copy and haven't yet updated current->data to match copy git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2599 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
d29b9d5bd6
commit
c4dbdd55f5
|
@ -134,6 +134,12 @@ CVS code -
|
||||||
replace_line()
|
replace_line()
|
||||||
- Make new_line_size and search_match_count size_t's, for
|
- Make new_line_size and search_match_count size_t's, for
|
||||||
consistency. (DLR)
|
consistency. (DLR)
|
||||||
|
do_replace_loop()
|
||||||
|
- When moving to the next match, update the screen using
|
||||||
|
edit_refresh() instead of edit_redraw(), as the latter won't
|
||||||
|
work properly when we've replaced one or more instances of a
|
||||||
|
string in copy and haven't yet updated current->data to match
|
||||||
|
copy. (DLR)
|
||||||
- utils.c:
|
- utils.c:
|
||||||
num_of_digits()
|
num_of_digits()
|
||||||
- Use a size_t instead of an int, and rename to digits(). (DLR)
|
- Use a size_t instead of an int, and rename to digits(). (DLR)
|
||||||
|
|
|
@ -681,7 +681,6 @@ ssize_t do_replace_loop(const char *needle, const filestruct
|
||||||
{
|
{
|
||||||
ssize_t numreplaced = -1;
|
ssize_t numreplaced = -1;
|
||||||
size_t match_len;
|
size_t match_len;
|
||||||
size_t pww_save = placewewant;
|
|
||||||
bool replaceall = FALSE;
|
bool replaceall = FALSE;
|
||||||
#ifdef HAVE_REGEX_H
|
#ifdef HAVE_REGEX_H
|
||||||
/* The starting-line match and bol/eol regex flags. */
|
/* The starting-line match and bol/eol regex flags. */
|
||||||
|
@ -743,10 +742,8 @@ ssize_t do_replace_loop(const char *needle, const filestruct
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!replaceall) {
|
if (!replaceall)
|
||||||
edit_redraw(real_current, pww_save);
|
edit_refresh();
|
||||||
pww_save = placewewant;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Record for the return value that we found the search
|
/* Record for the return value that we found the search
|
||||||
* string. */
|
* string. */
|
||||||
|
|
Loading…
Reference in New Issue