Skip to content

Commit 97d09eb

Browse files
committed
coul: fix batch number in window title
When running a selected batch, we increment the batch number before processing it. So allow for this when updating window title.
1 parent d68eab0 commit 97d09eb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

coul.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,8 @@ char *diag_buf = NULL;
250250
void update_window(void) {
251251
if (vt100) {
252252
/* update window title and icon with <ESC> ] 0 ; "string" <BEL> */
253-
printf("\x1b]0;b%d:", batch_alloc);
253+
uint this_batch = (opt_batch_min < 0) ? batch_alloc : batch_alloc - 1;
254+
printf("\x1b]0;b%d:", this_batch);
254255
uint pc = 0;
255256
for (uint i = 1; i < level && pc < 3; ++i) {
256257
if (levels[i].is_forced)

0 commit comments

Comments
 (0)