1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

Revert "term: obtain the cursor position via termios.h (#11372)"

This reverts commit af28d09630.
This commit is contained in:
Alexander Medvednikov
2021-09-06 18:21:55 +03:00
parent af28d09630
commit 0376cbf6bd
19 changed files with 129 additions and 196 deletions

View File

@ -57,9 +57,9 @@ fn test_header() {
assert term_width == term.header('1234', '_-/\\/\\').len
}
fn test_get_cursor_position() ? {
original_position := term.get_cursor_position() ?
cursor_position_1 := term.get_cursor_position() ?
fn test_get_cursor_position() {
original_position := term.get_cursor_position()
cursor_position_1 := term.get_cursor_position()
assert original_position.x == cursor_position_1.x
assert original_position.y == cursor_position_1.y
//
@ -67,13 +67,13 @@ fn test_get_cursor_position() ? {
x: 10
y: 11
)
cursor_position_2 := term.get_cursor_position() ?
cursor_position_2 := term.get_cursor_position()
//
term.set_cursor_position(
x: 5
y: 6
)
cursor_position_3 := term.get_cursor_position() ?
cursor_position_3 := term.get_cursor_position()
//
term.set_cursor_position(original_position)
eprintln('original_position: $original_position')