From a62adf5f7df9bdcabcecba002699af7980dd9203 Mon Sep 17 00:00:00 2001 From: Sadrul Habib Chowdhury Date: Sun, 8 Feb 2009 16:14:46 -0500 Subject: [PATCH] Fix the rendition of some specific %w flags. --- src/process.c | 9 ++++++--- src/screen.c | 4 +--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/process.c b/src/process.c index 13ed377..73a7964 100644 --- a/src/process.c +++ b/src/process.c @@ -5272,7 +5272,11 @@ int where; { int rend = -1; if (pp - wtab == where && ss == buf) - ss = s; + { + ss = s; + if (flags & 8) + break; + } if ((p = *pp) == 0) continue; if ((flags & 1) && display && p == D_fore) @@ -5291,8 +5295,7 @@ int where; *s++ = ' '; *s++ = ' '; } - if (((flags & 4) && where >= 0 && where < p->w_number) || - (!(flags & 4) && where >= 0 && where > p->w_number)) + if (!(flags & 4) || where < 0 || ((flags & 4) && where < p->w_number)) { if (p->w_monitor == MON_DONE && renditions[REND_MONITOR] != -1) rend = renditions[REND_MONITOR]; diff --git a/src/screen.c b/src/screen.c index 3d1da36..5064652 100644 --- a/src/screen.c +++ b/src/screen.c @@ -2688,9 +2688,7 @@ int rec; oldfore = D_fore; D_fore = win; } - ss = AddWindows(p, l - 1, (*s == 'w' ? 0 : 1) | (longflg ? 0 : 2) | (plusflg ? 4 : 0), win ? win->w_number : -1); - if (minusflg) - *ss = 0; + ss = AddWindows(p, l - 1, (*s == 'w' ? 0 : 1) | (longflg ? 0 : 2) | (plusflg ? 4 : 0) | (minusflg ? 8 : 0), win ? win->w_number : -1); if (display) D_fore = oldfore; } -- 2.11.4.GIT