screen: rename 'edit_refresh_needed' to 'refresh_needed'

For a little contrast with the function edit_refresh() -- it's
annoying that when you search for the latter you get to see all
the settings of the flag too.
master
Benno Schulenberg 2016-04-25 21:14:18 +02:00
parent b97c36c218
commit 53f4a9f5a8
10 changed files with 36 additions and 36 deletions

View File

@ -329,7 +329,7 @@ void reset_multis_for_id(filestruct *fileptr, int index)
row->multidata[index] = -1;
}
edit_refresh_needed = TRUE;
refresh_needed = TRUE;
}
/* Reset multi-line strings around the filestruct fileptr, trying to be

View File

@ -204,7 +204,7 @@ void do_cut_text(
#endif /* !NANO_TINY */
set_modified();
edit_refresh_needed = TRUE;
refresh_needed = TRUE;
#ifndef DISABLE_COLOR
reset_multis(openfile->current, FALSE);
@ -294,7 +294,7 @@ void do_uncut_text(void)
/* Mark the file as modified. */
set_modified();
edit_refresh_needed = TRUE;
refresh_needed = TRUE;
#ifndef DISABLE_COLOR
reset_multis(openfile->current, FALSE);

View File

@ -2887,7 +2887,7 @@ char *input_tab(char *buf, bool allow_files, size_t *place,
}
wnoutrefresh(edit);
edit_refresh_needed = TRUE;
refresh_needed = TRUE;
listed = TRUE;
}

View File

@ -157,9 +157,9 @@ char *syntaxstr = NULL;
/* The color syntax name specified on the command line. */
#endif
bool edit_refresh_needed = FALSE;
/* Did a command mangle enough of the buffer refresh that we
* should repaint the screen? */
bool refresh_needed = FALSE;
/* Did a command mangle enough of the buffer that we should
* repaint the screen? */
int currmenu;
/* The currently loaded menu. */

View File

@ -32,7 +32,7 @@ void do_first_line(void)
openfile->current_x = 0;
openfile->placewewant = 0;
edit_refresh_needed = TRUE;
refresh_needed = TRUE;
}
/* Move to the last line of the file. */
@ -43,7 +43,7 @@ void do_last_line(void)
openfile->placewewant = xplustabs();
openfile->current_y = editwinrows - 1;
edit_refresh_needed = TRUE;
refresh_needed = TRUE;
}
/* Move up one page. */
@ -97,7 +97,7 @@ void do_page_up(void)
/* Scroll the edit window up a page. */
edit_update(STATIONARY);
edit_refresh_needed = TRUE;
refresh_needed = TRUE;
}
/* Move down one page. */
@ -138,7 +138,7 @@ void do_page_down(void)
/* Scroll the edit window down a page. */
edit_update(STATIONARY);
edit_refresh_needed = TRUE;
refresh_needed = TRUE;
}
#ifndef DISABLE_JUSTIFY
@ -498,7 +498,7 @@ void do_down(
editwinrows / 2 + 1);
if (ISSET(SOFTWRAP)) {
edit_refresh_needed = TRUE;
refresh_needed = TRUE;
return;
}
}

View File

@ -405,7 +405,7 @@ void move_to_filestruct(filestruct **file_top, filestruct **file_bot,
* it in range of current. */
if (edittop_inside) {
edit_update(STATIONARY);
edit_refresh_needed = TRUE;
refresh_needed = TRUE;
}
/* Renumber starting with the beginning line of the old
@ -1702,12 +1702,12 @@ int do_input(bool allow_funcs)
if (f && !f->viewok)
reset_multis(openfile->current, FALSE);
#endif
if (edit_refresh_needed) {
if (refresh_needed) {
#ifdef DEBUG
fprintf(stderr, "running edit_refresh() as edit_refresh_needed is true\n");
fprintf(stderr, "running edit_refresh() as refresh_needed is true\n");
#endif
edit_refresh();
edit_refresh_needed = FALSE;
refresh_needed = FALSE;
} else if (s->scfunc == do_delete || s->scfunc == do_backspace)
update_line(openfile->current, openfile->current_x);
}
@ -1908,16 +1908,16 @@ void do_output(char *output, size_t output_len, bool allow_cntrls)
/* If we're wrapping text, we need to call edit_refresh(). */
if (!ISSET(NO_WRAP))
if (do_wrap(openfile->current))
edit_refresh_needed = TRUE;
refresh_needed = TRUE;
#endif
}
#ifndef NANO_TINY
/* Well, we might also need a full refresh if we've changed the
* line length to be a new multiple of COLS. */
if (ISSET(SOFTWRAP) && edit_refresh_needed == FALSE)
if (ISSET(SOFTWRAP) && refresh_needed == FALSE)
if (strlenpt(openfile->current->data) / COLS != orig_lenpt / COLS)
edit_refresh_needed = TRUE;
refresh_needed = TRUE;
#endif
free(char_buf);
@ -1928,9 +1928,9 @@ void do_output(char *output, size_t output_len, bool allow_cntrls)
reset_multis(openfile->current, FALSE);
#endif
if (edit_refresh_needed == TRUE) {
if (refresh_needed == TRUE) {
edit_refresh();
edit_refresh_needed = FALSE;
refresh_needed = FALSE;
} else
update_line(openfile->current, openfile->current_x);
}

View File

@ -111,7 +111,7 @@ extern syntaxtype *syntaxes;
extern char *syntaxstr;
#endif
extern bool edit_refresh_needed;
extern bool refresh_needed;
extern int currmenu;
extern sc *sclist;

View File

@ -242,7 +242,7 @@ int search_init(bool replacing, bool use_answer)
} else if (func == do_gotolinecolumn_void) {
do_gotolinecolumn(openfile->current->lineno,
openfile->placewewant + 1, TRUE, TRUE);
edit_refresh_needed = TRUE;
refresh_needed = TRUE;
return 3;
}
@ -878,7 +878,7 @@ void goto_line_posx(ssize_t line, size_t pos_x)
openfile->current_x = pos_x;
openfile->placewewant = xplustabs();
edit_refresh_needed = TRUE;
refresh_needed = TRUE;
}
/* Go to the specified line and column, or ask for them if interactive

View File

@ -149,14 +149,14 @@ void do_deletion(undo_type action)
openfile->totsize--;
/* Two lines were joined, so we need to refresh the screen. */
edit_refresh_needed = TRUE;
refresh_needed = TRUE;
} else
return;
#ifndef NANO_TINY
if (ISSET(SOFTWRAP) && edit_refresh_needed == FALSE)
if (ISSET(SOFTWRAP) && refresh_needed == FALSE)
if (strlenpt(openfile->current->data) / COLS != orig_lenpt / COLS)
edit_refresh_needed = TRUE;
refresh_needed = TRUE;
#endif
set_modified();
@ -408,7 +408,7 @@ void do_indent(ssize_t cols)
set_modified();
/* Update the screen. */
edit_refresh_needed = TRUE;
refresh_needed = TRUE;
}
}
@ -809,7 +809,7 @@ void do_enter()
update_undo(ENTER);
#endif
edit_refresh_needed = TRUE;
refresh_needed = TRUE;
}
#ifndef NANO_TINY
@ -2009,7 +2009,7 @@ void do_justify(bool full_justify)
last_par_line = openfile->filebot;
break;
} else {
edit_refresh_needed = TRUE;
refresh_needed = TRUE;
return;
}
}
@ -2308,7 +2308,7 @@ void do_justify(bool full_justify)
if (!openfile->modified)
titlebar(NULL);
edit_refresh_needed = TRUE;
refresh_needed = TRUE;
}
} else {
/* Put the keystroke back into the queue. */
@ -2643,7 +2643,7 @@ const char *do_int_speller(const char *tempfile_name)
free(read_buff);
search_replace_abort();
edit_refresh_needed = TRUE;
refresh_needed = TRUE;
/* Process the end of the three processes. */
waitpid(pid_spell, &spell_status, 0);

View File

@ -2870,7 +2870,7 @@ void edit_scroll(scroll_dir direction, ssize_t nlines)
ssize_t len = strlenpt(openfile->edittop->data) / COLS;
i -= len;
if (len > 0)
edit_refresh_needed = TRUE;
refresh_needed = TRUE;
}
#endif
}
@ -2882,9 +2882,9 @@ void edit_scroll(scroll_dir direction, ssize_t nlines)
if (nlines == 0)
return;
if (nlines >= editwinrows)
edit_refresh_needed = TRUE;
refresh_needed = TRUE;
if (edit_refresh_needed == TRUE)
if (refresh_needed == TRUE)
return;
/* Scroll the text of the edit window up or down nlines lines,
@ -2956,7 +2956,7 @@ void edit_redraw(filestruct *old_current)
if (openfile->current->lineno >= openfile->edittop->lineno + maxrows ||
openfile->current->lineno < openfile->edittop->lineno) {
edit_update((focusing || !ISSET(SMOOTH_SCROLL)) ? CENTERING : FLOWING);
edit_refresh_needed = TRUE;
refresh_needed = TRUE;
}
#ifndef NANO_TINY