diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2004-02-17 10:41:24 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2004-02-17 10:41:24 +0000 |
commit | ce41b8785b65655dbe9b497b016dcf8741eb5aef (patch) | |
tree | 440ad566a86e7afcdff71f96131e93aa36773fb9 | |
parent | a5cced9099f39d19fd55791a011bfe769c597a1a (diff) | |
download | zsh-ce41b8785b65655dbe9b497b016dcf8741eb5aef.tar.gz zsh-ce41b8785b65655dbe9b497b016dcf8741eb5aef.tar.xz zsh-ce41b8785b65655dbe9b497b016dcf8741eb5aef.zip |
19427: last job in jobs wasn't reported.
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | Src/jobs.c | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog index 6cabd20c1..3a2d0dcb3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2004-02-17 Peter Stephenson <pws@csr.com> + + * 19427: Src/jobs.c: last job in table wasn't reported with `jobs'. + 2004-02-16 Oliver Kiddle <opk@zsh.org> * unposted: Completion/Unix/Command/_apachectl: complete also for diff --git a/Src/jobs.c b/Src/jobs.c index be44158c6..0188989df 100644 --- a/Src/jobs.c +++ b/Src/jobs.c @@ -1488,14 +1488,14 @@ bin_fg(char *name, char **argv, Options ops, int func) int curmaxjob, ignorejob; if (unset(MONITOR) && oldmaxjob) { jobptr = oldjobtab; - curmaxjob = oldmaxjob; + curmaxjob = oldmaxjob ? oldmaxjob - 1 : 0; ignorejob = 0; } else { jobptr = jobtab; curmaxjob = maxjob; ignorejob = thisjob; } - for (job = 0; job != curmaxjob; job++, jobptr++) + for (job = 0; job <= curmaxjob; job++, jobptr++) if (job != ignorejob && jobptr->stat) { if ((!OPT_ISSET(ops,'r') && !OPT_ISSET(ops,'s')) || (OPT_ISSET(ops,'r') && OPT_ISSET(ops,'s')) || |