diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2025-02-03 20:54:13 +0000 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2025-02-03 20:54:13 +0000 |
commit | 34e350d44fd0db988fc5620acbbf447a81408ddb (patch) | |
tree | 87e115fef49faa0ab65e6c9f24f9eb5571cde9a5 | |
parent | ca9ae4d1f17ec05f4dd43dd8113661463917a080 (diff) | |
download | basta-34e350d44fd0db988fc5620acbbf447a81408ddb.tar.gz basta-34e350d44fd0db988fc5620acbbf447a81408ddb.tar.bz2 basta-34e350d44fd0db988fc5620acbbf447a81408ddb.zip |
- When we query the current line from the terminal, there
are situations when that might time out and yield a blank
response. In basta.check_cursor, we guard against that, or
else the user may, rarely, see a message complaining that
the [ command is missing an operand for the -gt operator.
-rw-r--r-- | basta.sh | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -99,7 +99,7 @@ basta.check_cursor() local exit=$? local curln=$(basta.get_cur_line) - if [ $curln -gt $basta_scroll_lines ]; then + if [ $curln ] && [ $curln -gt $basta_scroll_lines ]; then printf $'\e[%s;1H' $basta_scroll_lines fi fi |