mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-09 17:19:03 -04:00
uniblock: only render at end of a block #41
This commit is contained in:
parent
762689b276
commit
750518c091
@ -112,9 +112,9 @@ int unicodeblocks_demo(struct notcurses* nc){
|
||||
}
|
||||
}
|
||||
cell_release(n, &c);
|
||||
if(notcurses_render(nc)){
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
if(notcurses_render(nc)){
|
||||
return -1;
|
||||
}
|
||||
usleep(10000);
|
||||
// for a 32-bit wchar_t, we would want up through 24 bits of block ID. but
|
||||
|
@ -576,7 +576,7 @@ int notcurses_render(notcurses* nc){
|
||||
int y, x;
|
||||
char* buf = NULL;
|
||||
size_t buflen = 0;
|
||||
FILE* out = open_memstream(&buf, &buflen);
|
||||
FILE* out = open_memstream(&buf, &buflen); // worth keeping around?
|
||||
if(out == NULL){
|
||||
return -1;
|
||||
}
|
||||
@ -600,7 +600,7 @@ int notcurses_render(notcurses* nc){
|
||||
}
|
||||
}
|
||||
ret |= fclose(out);
|
||||
printf("%.*s", (int)buflen, buf);
|
||||
printf("%s", buf);
|
||||
clock_gettime(CLOCK_MONOTONIC, &done);
|
||||
free(buf);
|
||||
update_render_stats(&done, &start, &nc->stats);
|
||||
|
Loading…
x
Reference in New Issue
Block a user