tweaks: get rid of some spurious textual references to edit_refresh()

master
Benno Schulenberg 2016-12-02 17:37:11 +01:00
parent c9680b8b64
commit 0f3e303d1a
4 changed files with 9 additions and 11 deletions

View File

@ -1911,10 +1911,9 @@ void do_output(char *output, size_t output_len, bool allow_cntrls)
#endif
#ifndef DISABLE_WRAPPING
/* If we're wrapping text, we need to call edit_refresh(). */
if (!ISSET(NO_WRAP))
if (do_wrap(openfile->current))
refresh_needed = TRUE;
/* If text gets wrapped, the edit window needs a refresh. */
if (!ISSET(NO_WRAP) && do_wrap(openfile->current))
refresh_needed = TRUE;
#endif
}

View File

@ -734,8 +734,8 @@ ssize_t do_replace_loop(const char *needle, bool whole_word_only,
if (!replaceall) {
#ifndef DISABLE_COLOR
/* If color syntaxes are available and turned on, we
* need to call edit_refresh(). */
/* When doing syntax coloring, the replacement might require
* a change of colors, so refresh the whole edit window. */
if (openfile->colorstrings != NULL && !ISSET(NO_COLOR_SYNTAX))
edit_refresh();
else

View File

@ -2461,9 +2461,8 @@ void do_justify(bool full_justify)
} else
openfile->current_x = strlen(openfile->current->data);
/* Renumber the lines of the now-justified current paragraph,
* since both find_paragraph() and edit_refresh() need the line
* numbers to be right. */
/* Renumber the now-justified paragraph, since both refreshing the
* edit window and finding a paragraph need correct line numbers. */
renumber(curr_first_par_line);
/* We've just finished justifying the paragraph. If we're not

View File

@ -2996,7 +2996,7 @@ void edit_refresh(void)
if (openfile->current->lineno < openfile->edittop->lineno ||
openfile->current->lineno >= openfile->edittop->lineno + maxrows) {
#ifdef DEBUG
fprintf(stderr, "edit_refresh(): line = %ld, edittop %ld + maxrows %d\n",
fprintf(stderr, "edit-refresh: line = %ld, edittop = %ld and maxrows = %d\n",
(long)openfile->current->lineno, (long)openfile->edittop->lineno, maxrows);
#endif
adjust_viewport((focusing || !ISSET(SMOOTH_SCROLL)) ? CENTERING : STATIONARY);
@ -3005,7 +3005,7 @@ void edit_refresh(void)
foo = openfile->edittop;
#ifdef DEBUG
fprintf(stderr, "edit_refresh(): edittop->lineno = %ld\n", (long)openfile->edittop->lineno);
fprintf(stderr, "edit-refresh: now edittop = %ld\n", (long)openfile->edittop->lineno);
#endif
for (nlines = 0; nlines < editwinrows && foo != NULL; nlines++) {