diff options
| author | dam <dam@gudinoff> | 2024-03-29 01:04:23 +0000 |
|---|---|---|
| committer | dam <dam@gudinoff> | 2024-03-29 01:04:23 +0000 |
| commit | 10215fb3b2d5a178b8ab0419d58d30af3abab625 (patch) | |
| tree | e5c1c61c65ddeedd82b41b13b6811e7911cc9010 /ttt.jai | |
| parent | 921e162a7369a45c5ddaa2355bbe8db0259d6526 (diff) | |
| download | task-time-tracker-10215fb3b2d5a178b8ab0419d58d30af3abab625.tar.zst task-time-tracker-10215fb3b2d5a178b8ab0419d58d30af3abab625.zip | |
Fixed cursor control on read_input_line.
Diffstat (limited to 'ttt.jai')
| -rw-r--r-- | ttt.jai | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -1396,7 +1396,8 @@ main :: () { TUI.clear_terminal(); TUI.set_cursor_position(1, 1); print("Enter some text (use Enter to finish, Esc to cancel, or resize to abort):"); - TUI.set_cursor_position(2, 1); + r, c := TUI.get_cursor_position(); + TUI.set_cursor_position(r+1, 1); str, key := TUI.read_input_line(15); TUI.set_cursor_position(3, 1); if key == { @@ -1421,16 +1422,17 @@ main :: () { } // BUG - SECOND TIME CALLING TO read_input_line fails... + // SECOND TIME CALLING TO read_input_line fails... - if 1 { + if 0 { print("TEST : hidden user input\n", to_standard_error = true); auto_release_temp(); TUI.start(); TUI.clear_terminal(); TUI.set_cursor_position(1, 1); print("Enter some text (use Enter to finish, Esc to cancel, or resize to abort):"); - TUI.set_cursor_position(2, 1); + r, c := TUI.get_cursor_position(); + TUI.set_cursor_position(r+1, 1); str, key := TUI.read_input_line(15, false); TUI.set_cursor_position(3, 1); if key == { |
