Commit 66986591 authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

screen: displaying the cursor position should not suppress it next time

Take the side effect of a 'statusbar' call -- setting suppress_cursorpos
to TRUE -- into account.  This effect was overlooked by commit 9d6d5b67.
No related merge requests found
Showing with 5 additions and 3 deletions
+5 -3
...@@ -3059,10 +3059,9 @@ void do_cursorpos(bool constant) ...@@ -3059,10 +3059,9 @@ void do_cursorpos(bool constant)
openfile->current->next = f; openfile->current->next = f;
/* If the position needs to be suppressed, don't suppress it next time. */ /* If the position needs to be suppressed, don't suppress it next time. */
if (suppress_cursorpos) { if (suppress_cursorpos && constant) {
suppress_cursorpos = FALSE; suppress_cursorpos = FALSE;
if (constant) return;
return;
} }
/* Display the current cursor position on the statusbar. */ /* Display the current cursor position on the statusbar. */
...@@ -3076,6 +3075,9 @@ void do_cursorpos(bool constant) ...@@ -3076,6 +3075,9 @@ void do_cursorpos(bool constant)
(long)openfile->filebot->lineno, linepct, (long)openfile->filebot->lineno, linepct,
(unsigned long)cur_xpt, (unsigned long)cur_lenpt, colpct, (unsigned long)cur_xpt, (unsigned long)cur_lenpt, colpct,
(unsigned long)i, (unsigned long)openfile->totsize, charpct); (unsigned long)i, (unsigned long)openfile->totsize, charpct);
/* Displaying the cursor position should not suppress it next time. */
suppress_cursorpos = FALSE;
} }
/* Unconditionally display the current cursor position. */ /* Unconditionally display the current cursor position. */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment