Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
general: Fix bug with characters appearing on screen
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanaraps committed Jan 27, 2019
1 parent 37c23d6 commit 6ea4b42
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions fff
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ setup_terminal() {
# '\e[1;Nr': Limit scrolling to scrolling area.
# Also sets cursor to (0,0).
printf '\e[?1049h\e[?6h\e[?7l\e[?25l\e[2J\e[1;%sr' "$max_items"

# Hide echoing of user input
stty -echo
}

reset_terminal() {
Expand All @@ -39,6 +42,9 @@ reset_terminal() {
# '\e[;r': Set the scroll region to its default value.
# Also sets cursor to (0,0).
printf '\e[?6l\e[?7h\e[?25h\e[2J\e[;r'

# Show user input.
stty echo
}

clear_screen() {
Expand Down

0 comments on commit 6ea4b42

Please sign in to comment.