all: minor array fixes

pull/7429/head
Alexander Medvednikov 2020-12-20 15:40:49 +01:00
parent 6bf21c300a
commit 3c210a57f9
2 changed files with 3 additions and 7 deletions

View File

@ -64,8 +64,7 @@ const (
) )
fn main() { fn main() {
args := os.args args_string := os.args[1..].join(' ')
args_string := args[1..].join(' ')
pass_args := args_string.all_before('test-cleancode') pass_args := args_string.all_before('test-cleancode')
v_test_vetting(pass_args) v_test_vetting(pass_args)
} }

View File

@ -295,7 +295,7 @@ fn shift_cursor(xpos int, yoffset int) {
} }
fn calculate_screen_position(x_in int, y_in int, screen_columns int, char_count int, inp []int) []int { fn calculate_screen_position(x_in int, y_in int, screen_columns int, char_count int, inp []int) []int {
mut out := inp mut out := inp.clone()
mut x := x_in mut x := x_in
mut y := y_in mut y := y_in
out[0] = x out[0] = x
@ -447,10 +447,7 @@ fn (mut r Readline) switch_overwrite() {
} }
fn (mut r Readline) clear_screen() { fn (mut r Readline) clear_screen() {
term.set_cursor_position({ term.set_cursor_position(x: 1, y: 1)
x: 1
y: 1
})
term.erase_clear() term.erase_clear()
r.refresh_line() r.refresh_line()
} }