Skip to content

Commit e4ab9d0

Browse files
Merge pull request #126 from peperronii/patch-2
raw mode until end of program
2 parents f87522c + 9b5ca3b commit e4ab9d0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

console/raw_console/main.odin

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ import "core:time"
77
import "core:unicode/utf8"
88

99
get_password :: proc(allocator := context.allocator) -> string {
10-
enable_raw_mode()
11-
defer disable_raw_mode()
1210

1311
fmt.print("Enter password: ")
1412

@@ -66,6 +64,9 @@ draw_progress_bar :: proc(title: string, percent: int, width := 25) {
6664
main :: proc() {
6765
set_utf8_terminal()
6866

67+
enable_raw_mode()
68+
defer disable_raw_mode()
69+
6970
password := get_password()
7071
defer delete(password)
7172

0 commit comments

Comments
 (0)