Skip to content

Commit 4acf324

Browse files
committed
fix itext display
1 parent ede5722 commit 4acf324

File tree

3 files changed

+11
-24
lines changed

3 files changed

+11
-24
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
- add `vips_image_guess_interpretation` builtin
1010
- improve display of computed multipage images
1111
- batch mode output is lazy
12-
- ++ is lazy
12+
- ++, join_sep, difference are lazy
1313

1414
## 9.0.13 2025/09/20
1515

TODO

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,9 @@
1-
- try:
2-
3-
join_sep ", " (map print [1..])
4-
5-
seems to work, but locks the CPU at 100%, never shows a progress bar
6-
7-
- try:
8-
9-
print primes
10-
11-
never prints anything ... hard to make print lazy
12-
131
- remove trace stuff from reduce
142

153
also remove prefs workspace stuff?
164

5+
things like max heap size should be settable ... maybe pres are useful?
6+
177
- add multiple definitions, finish function argument destructuring
188

199
sym has a field for "next definition", initially NULL

src/itext.c

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,7 @@ itext_add_list(PElement *base, VipsBuf *buf, gboolean *first)
9393
if (!itext_add_element(buf, base, FALSE, FALSE))
9494
return base;
9595

96-
/* Buffer full? Abort list print.
97-
*/
98-
if (buf->full)
96+
if (vips_buf_is_full(buf))
9997
return base;
10098

10199
return NULL;
@@ -125,11 +123,8 @@ itext_add_string(PElement *base, VipsBuf *buf)
125123
return base;
126124
}
127125

128-
/* Buffer full? Abort string print, though it's not an error (return
129-
* NULL).
130-
*/
131-
if (buf->full)
132-
return NULL;
126+
if (vips_buf_is_full(buf))
127+
return base;
133128

134129
return NULL;
135130
}
@@ -304,7 +299,8 @@ itext_decompile(Reduce *rc, VipsBuf *buf, PElement *root)
304299
if (!reduce_pelement(rc, reduce_spine, root))
305300
return FALSE;
306301

307-
if (!itext_decompile_element(buf, root, TRUE) && !buf->full)
302+
if (!itext_decompile_element(buf, root, TRUE) &&
303+
!vips_buf_is_full(buf))
308304
/* Tally eval failed, and buffer is not full ... must
309305
* have been an eval error.
310306
*/
@@ -455,7 +451,7 @@ itext_value(Reduce *rc, VipsBuf *buf, PElement *root)
455451
return FALSE;
456452

457453
if (!itext_add_element(buf, root, TRUE, FALSE) &&
458-
!buf->full)
454+
!vips_buf_is_full(buf))
459455
/* Tally eval failed, and buffer is not full ... must
460456
* have been an eval error.
461457
*/
@@ -558,7 +554,8 @@ itext_make_value_string(Expr *expr, VipsBuf *buf)
558554
return TRUE;
559555
}
560556

561-
if (!itext_value_toplevel(reduce_context, buf, &expr->root))
557+
if (!itext_value_toplevel(reduce_context, buf, &expr->root) &&
558+
!vips_buf_is_full(buf))
562559
return FALSE;
563560

564561
return TRUE;

0 commit comments

Comments
 (0)