top: fix the bug affecting certain Find/Locate results
When 'Other Filtering' was introduced the idea of what constituted a displayed row changed. No longer was any call to task_show assured of consuming one screen row. Now the determining factor was whether or not the rows were empty. This worked Ok until a certain Find string was active then the entire display could be corrupted. With Find active, the task_show() function alters each returned row while highlighting each visible match. If the search was on a single byte value & matched at the beginning of a row the match got overwritten with '\0' which then appears empty upon return to window_show(). So that row would not be counted as having been shown. This was best illustrated with a Find on a single ' '. This patch will restore proper 'Find/Locate' behavior. Reference(s): commit 5edc6fb3174f1fd02bbfca61ec6d8a3a2e12f71c Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
parent
2840d7f4c6
commit
4aa917455c
@ -5192,6 +5192,8 @@ static const char *task_show (const WIN_t *q, const proc_t *p) {
|
||||
ofs = find_ofs(q, row);
|
||||
} while (-1 < ofs);
|
||||
PUTT("%s%s", row, Caps_endline);
|
||||
// with a corrupted rbuf, ensure row is 'counted' by window_show
|
||||
rbuf[0] = '!';
|
||||
} else
|
||||
PUFF("\n%s%s%s", cap, row, Caps_endline);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user