]> granicus.if.org Git - procps-ng/commit
top: highlight all inspect search string(s) when found
authorJim Warner <james.warner@comcast.net>
Mon, 3 Dec 2012 06:00:00 +0000 (00:00 -0600)
committerCraig Small <csmall@enc.com.au>
Sun, 9 Dec 2012 22:29:27 +0000 (09:29 +1100)
commit5ff464bdb1ad56631ed4a4350553b71daf08739d
tree8eda0150baa24c2d0cac9007d8cca0ce1351f87e
parent8292f7b8ec8193cf9bf55f375c0f6b2e8296ae5c
top: highlight all inspect search string(s) when found

We have modeled the Inspect search provisions on those
provided by the 'less' pager. With this commit we take
the next step and provide for highlighting any strings
matched (and in view). Of course, top will continue to
adjust the beginning column so as to bring out-of-view
matches into view, while highlighting visible matches.

However, top won't emulate every 'less' behavior since
the following are seen as flaws in the user interface.

* when viewing true binary data, less makes no attempt
. to smooth the right margin by truncating unprintable
. symbols, thus creatng ragged unappealing right edges

* when viewing true binary data, less will always fail
. search requests regardless of surrounding characters

* less refuses to bring out-of-view found matches into
. view by adjusting the left-most column, if necessary

(now that we know a '.' + 2 spaces is squeezed to one)
(everything's perfectly justified, but it's just luck)

Signed-off-by: Jim Warner <james.warner@comcast.net>
top/top.c
top/top.h