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; row->multidata[index] = -1;
} }
edit_refresh_needed = TRUE; refresh_needed = TRUE;
} }
/* Reset multi-line strings around the filestruct fileptr, trying to be /* Reset multi-line strings around the filestruct fileptr, trying to be

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -242,7 +242,7 @@ int search_init(bool replacing, bool use_answer)
} else if (func == do_gotolinecolumn_void) { } else if (func == do_gotolinecolumn_void) {
do_gotolinecolumn(openfile->current->lineno, do_gotolinecolumn(openfile->current->lineno,
openfile->placewewant + 1, TRUE, TRUE); openfile->placewewant + 1, TRUE, TRUE);
edit_refresh_needed = TRUE; refresh_needed = TRUE;
return 3; return 3;
} }
@ -878,7 +878,7 @@ void goto_line_posx(ssize_t line, size_t pos_x)
openfile->current_x = pos_x; openfile->current_x = pos_x;
openfile->placewewant = xplustabs(); openfile->placewewant = xplustabs();
edit_refresh_needed = TRUE; refresh_needed = TRUE;
} }
/* Go to the specified line and column, or ask for them if interactive /* 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--; openfile->totsize--;
/* Two lines were joined, so we need to refresh the screen. */ /* Two lines were joined, so we need to refresh the screen. */
edit_refresh_needed = TRUE; refresh_needed = TRUE;
} else } else
return; return;
#ifndef NANO_TINY #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) if (strlenpt(openfile->current->data) / COLS != orig_lenpt / COLS)
edit_refresh_needed = TRUE; refresh_needed = TRUE;
#endif #endif
set_modified(); set_modified();
@ -408,7 +408,7 @@ void do_indent(ssize_t cols)
set_modified(); set_modified();
/* Update the screen. */ /* Update the screen. */
edit_refresh_needed = TRUE; refresh_needed = TRUE;
} }
} }
@ -809,7 +809,7 @@ void do_enter()
update_undo(ENTER); update_undo(ENTER);
#endif #endif
edit_refresh_needed = TRUE; refresh_needed = TRUE;
} }
#ifndef NANO_TINY #ifndef NANO_TINY
@ -2009,7 +2009,7 @@ void do_justify(bool full_justify)
last_par_line = openfile->filebot; last_par_line = openfile->filebot;
break; break;
} else { } else {
edit_refresh_needed = TRUE; refresh_needed = TRUE;
return; return;
} }
} }
@ -2308,7 +2308,7 @@ void do_justify(bool full_justify)
if (!openfile->modified) if (!openfile->modified)
titlebar(NULL); titlebar(NULL);
edit_refresh_needed = TRUE; refresh_needed = TRUE;
} }
} else { } else {
/* Put the keystroke back into the queue. */ /* Put the keystroke back into the queue. */
@ -2643,7 +2643,7 @@ const char *do_int_speller(const char *tempfile_name)
free(read_buff); free(read_buff);
search_replace_abort(); search_replace_abort();
edit_refresh_needed = TRUE; refresh_needed = TRUE;
/* Process the end of the three processes. */ /* Process the end of the three processes. */
waitpid(pid_spell, &spell_status, 0); 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; ssize_t len = strlenpt(openfile->edittop->data) / COLS;
i -= len; i -= len;
if (len > 0) if (len > 0)
edit_refresh_needed = TRUE; refresh_needed = TRUE;
} }
#endif #endif
} }
@ -2882,9 +2882,9 @@ void edit_scroll(scroll_dir direction, ssize_t nlines)
if (nlines == 0) if (nlines == 0)
return; return;
if (nlines >= editwinrows) if (nlines >= editwinrows)
edit_refresh_needed = TRUE; refresh_needed = TRUE;
if (edit_refresh_needed == TRUE) if (refresh_needed == TRUE)
return; return;
/* Scroll the text of the edit window up or down nlines lines, /* 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 || if (openfile->current->lineno >= openfile->edittop->lineno + maxrows ||
openfile->current->lineno < openfile->edittop->lineno) { openfile->current->lineno < openfile->edittop->lineno) {
edit_update((focusing || !ISSET(SMOOTH_SCROLL)) ? CENTERING : FLOWING); edit_update((focusing || !ISSET(SMOOTH_SCROLL)) ? CENTERING : FLOWING);
edit_refresh_needed = TRUE; refresh_needed = TRUE;
} }
#ifndef NANO_TINY #ifndef NANO_TINY