aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBart Schaefer <schaefer@zsh.org>2022-06-21 18:04:45 -0700
committerBart Schaefer <schaefer@zsh.org>2022-06-21 18:04:45 -0700
commitcb59dfb3a6f6cce414c5b852c138d5f6bea6d563 (patch)
tree54a2807244625ed1f9f5a66ea8d208cba1030443
parentf7441b46456c3acee4a2bd500b8f6409c70f33a8 (diff)
downloadzsh-master.tar.gz
zsh-master.tar.xz
zsh-master.zip
50379/50380: fix off-by-one side-effect of workers/49906 that broke $(jobs -l)HEADmaster
-rw-r--r--ChangeLog3
-rw-r--r--Src/jobs.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 0cdd632f9..5220d2e83 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2022-06-21 Bart Schaefer <schaefer@zsh.org>
+ * 50379 (tweaked per 50380): Src/jobs.c: fix off-by-one
+ side-effect of workers/49906 that broke $(jobs -l)
+
* 50368: Src/Modules/db_gdbm.c: adjust bitflags so local copies of
variables cannot mess with database file contents
diff --git a/Src/jobs.c b/Src/jobs.c
index e0e453ed8..707374297 100644
--- a/Src/jobs.c
+++ b/Src/jobs.c
@@ -2402,7 +2402,7 @@ bin_fg(char *name, char **argv, Options ops, int func)
int curmaxjob, ignorejob;
if (unset(MONITOR) && oldmaxjob) {
jobptr = oldjobtab;
- curmaxjob = oldmaxjob ? oldmaxjob - 1 : 0;
+ curmaxjob = oldmaxjob;
ignorejob = 0;
} else {
jobptr = jobtab;