mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
@ -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()
|
||||
|
Reference in New Issue
Block a user