diff --git a/src/color.c b/src/color.c index 9892445c7c205af8bcd04a3b8aaed20f0f8fb519..8b173d7298a143c67c5d0745ac65f554991f74f1 100644 --- a/src/color.c +++ b/src/color.c @@ -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 diff --git a/src/cut.c b/src/cut.c index edd0f87586a972e5fc967f13ef0f87e601dd4da6..109d37e3cbb1a327798bf46c858c04d78f679c6d 100644 --- a/src/cut.c +++ b/src/cut.c @@ -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); diff --git a/src/files.c b/src/files.c index d08f54de45b246a56f024fe56ef498e477a7df0e..42576517c11030335415abff24cde2fda5cdd671 100644 --- a/src/files.c +++ b/src/files.c @@ -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; } diff --git a/src/global.c b/src/global.c index 1c2f8af20a5702f7680dffd0aee963b29473d825..37de0383a31d4d2eac6c4aa53b6aaacc33023898 100644 --- a/src/global.c +++ b/src/global.c @@ -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. */ diff --git a/src/move.c b/src/move.c index dbb61b04fc552ed04b4e049177f2f871c4acff62..e2f9823ac399519b3ce5b647ee1af98650b6aacc 100644 --- a/src/move.c +++ b/src/move.c @@ -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; } } diff --git a/src/nano.c b/src/nano.c index ea61284e942bdfd3753fff45f46f0bb613cbfdb8..f7ef4a1a365e3adc19f34c8461aa293618df93a9 100644 --- a/src/nano.c +++ b/src/nano.c @@ -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); } diff --git a/src/proto.h b/src/proto.h index 5373476bbc3c02e4851ae4dbd9d6f79ef676873e..5faa6e49d8a019af30f51f1fe5b406d114cd390c 100644 --- a/src/proto.h +++ b/src/proto.h @@ -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; diff --git a/src/search.c b/src/search.c index 6aa8fe0f208173b79c50a9d3aef9a6f852dd8c97..dd0c1b277d189a46bec0385e307357c12ea4fdae 100644 --- a/src/search.c +++ b/src/search.c @@ -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 diff --git a/src/text.c b/src/text.c index 8106a5dc55f3135fdf80463cc7ee1ffe0efecdda..00a2be108b4861339d4cbcd3f21df86ea3ce07a4 100644 --- a/src/text.c +++ b/src/text.c @@ -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); diff --git a/src/winio.c b/src/winio.c index b1355db755a177c1718e2b2150436b341cd5ef3e..d8bbaa3443a552e1839c116bdd1e4137fa087dd7 100644 --- a/src/winio.c +++ b/src/winio.c @@ -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