Browse Source

* Allow to import empty files or files with only empty lines.

tags/v0.99.beta14
Sam Hocevar sam 18 years ago
parent
commit
7255c6b034
1 changed files with 9 additions and 0 deletions
  1. +9
    -0
      cucul/import.c

+ 9
- 0
cucul/import.c View File

@@ -233,6 +233,9 @@ static cucul_canvas_t *import_text(void const *data, unsigned int size)
x++;
}

if(y > height)
cucul_set_canvas_size(cv, width, height = y);

return cv;
}

@@ -431,6 +434,12 @@ static cucul_canvas_t *import_ansi(void const *data, unsigned int size,
x += wch;
}

if((unsigned int)y > height)
{
cucul_set_color(cv, CUCUL_COLOR_DEFAULT, CUCUL_COLOR_TRANSPARENT);
cucul_set_canvas_size(cv, width, height = y);
}

return cv;
}



Loading…
Cancel
Save