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>
This commit is contained in:
@@ -32,6 +32,7 @@
|
||||
//#define CASEUP_SUFIX /* show time/mem/cnts suffix in upper case */
|
||||
//#define CPU_ZEROTICS /* tolerate few tics when cpu off vs. idle */
|
||||
//#define EQUCOLHDRYES /* yes, do equalize column header lengths */
|
||||
//#define INSP_JUSTNOT /* don't smooth unprintable right margins */
|
||||
//#define INSP_OFFDEMO /* disable demo screens, issue msg instead */
|
||||
//#define INSP_SAVEBUF /* preserve 'Insp_buf' contents in a file */
|
||||
//#define INSP_SLIDE_1 /* when scrolling left/right don't move 8 */
|
||||
@@ -650,9 +651,11 @@ typedef struct WIN_t {
|
||||
#endif
|
||||
//atic void insp_do_file (char *fmts, int pid);
|
||||
//atic void insp_do_pipe (char *fmts, int pid);
|
||||
//atic void insp_find (int ch, int *col, int *row);
|
||||
//atic inline void insp_show_pg (int col, int row, int max);
|
||||
//atic int insp_view_this (char *hdr);
|
||||
//atic inline int insp_find_ofs (int col, int row);
|
||||
//atic void insp_find_str (int ch, int *col, int *row);
|
||||
//atic inline void insp_make_row (int col, int row);
|
||||
//atic void insp_show_pgs (int col, int row, int max);
|
||||
//atic int insp_view_choice (char *hdr);
|
||||
//atic void inspection_utility (int pid);
|
||||
/*------ Startup routines ----------------------------------------------*/
|
||||
//atic void before (char *me);
|
||||
|
Reference in New Issue
Block a user