Skip to content

Commit

Permalink
add --always-reprint flag
Browse files Browse the repository at this point in the history
  • Loading branch information
Qelxiros authored and noctuid committed May 11, 2024
1 parent abee462 commit 35c50fa
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 8 additions & 1 deletion zscroll
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ parser.add_argument(
""",
)

parser.add_argument(
'--always-reprint',
type=str_to_bool,
default=False,
help="reprint text every delay even if it hasn't changed"
)

parser.add_argument(
'-l',
'--length',
Expand Down Expand Up @@ -425,7 +432,7 @@ def zscroll(lines=0):
needs_scrolling,
(last_hidden_was_wide or next_hidden_is_wide),
)
if args.scroll and needs_scrolling or should_restart_printing:
if args.always_reprint or (args.scroll and needs_scrolling) or should_restart_printing:
print_text(display_text)
should_restart_printing = False
if args.scroll and needs_scrolling:
Expand Down
2 changes: 2 additions & 0 deletions zscroll.1
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ Add a newline after every update/step (may be necessary for use with panels). Ta
.TP
\fB\-t TIME\fR, \fB \-\-timeout=TIME\fR
Time in seconds to run before closing. An argument of zero implies infinite duration. (default: 0)
\fB \-\-always\-reprint=BOOL\fR
Whether to reprint unchanged text after the specified delay (default: false)
.SH EXAMPLES
These examples are meant for testing in the terminal (remove the "-n false" for use with panels).

Expand Down

0 comments on commit 35c50fa

Please sign in to comment.