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

checker: fix duplicate variable name (fix #265) (#7982)

This commit is contained in:
yuyi
2021-01-11 04:41:29 +08:00
committed by GitHub
parent 39bb6f0491
commit a1c67232d0
10 changed files with 67 additions and 44 deletions

View File

@ -323,14 +323,14 @@ fn (mut app App) paint(event &tui.Event) {
}
fn (mut app App) draw_content() {
w, mut h := app.tui.window_width / 2, app.tui.window_height - 8
if h > app.drawing.len {
h = app.drawing.len
w_, mut h_ := app.tui.window_width / 2, app.tui.window_height - 8
if h_ > app.drawing.len {
h_ = app.drawing.len
}
for row_idx, row in app.drawing[..h] {
for row_idx, row in app.drawing[..h_] {
app.tui.set_cursor_position(0, row_idx + 4)
mut last := tui.Color{0, 0, 0}
for cell in row[..w] {
for cell in row[..w_] {
if cell.r == 0 && cell.g == 0 && cell.b == 0 {
if !(cell.r == last.r && cell.g == last.g && cell.b == last.b) {
app.tui.reset()