tweaks: rename a variable and invert its logic
parent
9e6e1ebe58
commit
07ebba5e99
|
@ -2671,7 +2671,7 @@ int main(int argc, char **argv)
|
||||||
/* Update the displayed current cursor position only when there
|
/* Update the displayed current cursor position only when there
|
||||||
* are no keys waiting in the input buffer. */
|
* are no keys waiting in the input buffer. */
|
||||||
if (ISSET(CONST_UPDATE) && get_key_buffer_len() == 0)
|
if (ISSET(CONST_UPDATE) && get_key_buffer_len() == 0)
|
||||||
do_cursorpos(TRUE);
|
do_cursorpos(FALSE);
|
||||||
|
|
||||||
/* Refresh just the cursor position or the entire edit window. */
|
/* Refresh just the cursor position or the entire edit window. */
|
||||||
if (!refresh_needed) {
|
if (!refresh_needed) {
|
||||||
|
|
|
@ -756,7 +756,7 @@ void adjust_viewport(update_type location);
|
||||||
void total_redraw(void);
|
void total_redraw(void);
|
||||||
void total_refresh(void);
|
void total_refresh(void);
|
||||||
void display_main_list(void);
|
void display_main_list(void);
|
||||||
void do_cursorpos(bool constant);
|
void do_cursorpos(bool force);
|
||||||
void do_cursorpos_void(void);
|
void do_cursorpos_void(void);
|
||||||
void spotlight(bool active, const char *word);
|
void spotlight(bool active, const char *word);
|
||||||
void xon_complaint(void);
|
void xon_complaint(void);
|
||||||
|
|
|
@ -2510,7 +2510,7 @@ void do_justify(bool full_justify)
|
||||||
/* If needed, unset the cursor-position suppression flag, so the cursor
|
/* If needed, unset the cursor-position suppression flag, so the cursor
|
||||||
* position /will/ be displayed upon a return to the main loop. */
|
* position /will/ be displayed upon a return to the main loop. */
|
||||||
if (ISSET(CONST_UPDATE))
|
if (ISSET(CONST_UPDATE))
|
||||||
do_cursorpos(TRUE);
|
do_cursorpos(FALSE);
|
||||||
|
|
||||||
func = func_from_key(&kbinput);
|
func = func_from_key(&kbinput);
|
||||||
|
|
||||||
|
@ -3664,11 +3664,9 @@ void do_verbatim_input(void)
|
||||||
/* Read in all the verbatim characters. */
|
/* Read in all the verbatim characters. */
|
||||||
kbinput = get_verbatim_kbinput(edit, &kbinput_len);
|
kbinput = get_verbatim_kbinput(edit, &kbinput_len);
|
||||||
|
|
||||||
/* If constant cursor position display is on, make sure the current
|
/* Unsuppress cursor-position display or blank the statusbar. */
|
||||||
* cursor position will be properly displayed on the statusbar.
|
|
||||||
* Otherwise, blank the statusbar. */
|
|
||||||
if (ISSET(CONST_UPDATE))
|
if (ISSET(CONST_UPDATE))
|
||||||
do_cursorpos(TRUE);
|
do_cursorpos(FALSE);
|
||||||
else {
|
else {
|
||||||
blank_statusbar();
|
blank_statusbar();
|
||||||
wnoutrefresh(bottomwin);
|
wnoutrefresh(bottomwin);
|
||||||
|
|
14
src/winio.c
14
src/winio.c
|
@ -3032,10 +3032,10 @@ void display_main_list(void)
|
||||||
bottombars(MMAIN);
|
bottombars(MMAIN);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If constant is TRUE, we display the current cursor position only if
|
/* Show info about the current cursor position on the statusbar.
|
||||||
* suppress_cursorpos is FALSE. If constant is FALSE, we display the
|
* Do this unconditionally when force is TRUE; otherwise, only if
|
||||||
* position always. In any case we reset suppress_cursorpos to FALSE. */
|
* suppress_cursorpos is FALSE. In any case, reset the latter. */
|
||||||
void do_cursorpos(bool constant)
|
void do_cursorpos(bool force)
|
||||||
{
|
{
|
||||||
char saved_byte;
|
char saved_byte;
|
||||||
size_t sum, cur_xpt = xplustabs() + 1;
|
size_t sum, cur_xpt = xplustabs() + 1;
|
||||||
|
@ -3056,8 +3056,8 @@ void do_cursorpos(bool constant)
|
||||||
if (openfile->current != openfile->filebot)
|
if (openfile->current != openfile->filebot)
|
||||||
sum--;
|
sum--;
|
||||||
|
|
||||||
/* If the position needs to be suppressed, don't suppress it next time. */
|
/* If the showing needs to be suppressed, don't suppress it next time. */
|
||||||
if (suppress_cursorpos && constant) {
|
if (suppress_cursorpos && !force) {
|
||||||
suppress_cursorpos = FALSE;
|
suppress_cursorpos = FALSE;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -3081,7 +3081,7 @@ void do_cursorpos(bool constant)
|
||||||
/* Unconditionally display the current cursor position. */
|
/* Unconditionally display the current cursor position. */
|
||||||
void do_cursorpos_void(void)
|
void do_cursorpos_void(void)
|
||||||
{
|
{
|
||||||
do_cursorpos(FALSE);
|
do_cursorpos(TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void enable_nodelay(void)
|
void enable_nodelay(void)
|
||||||
|
|
Loading…
Reference in New Issue