ref: 3ab5f2ca87e8f035ff0a138258493f81f761ea69
parent: 14caf138d97d28e0455ea760708f0fc994d29873
author: phil9 <telephil9@gmail.com>
date: Wed Mar 23 03:53:03 EDT 2022
display a message when no result was found
--- a/dview.c
+++ b/dview.c
@@ -178,6 +178,10 @@
}else
scrposr = insetrect(scrollr, -1);
draw(screen, scrposr, cols->back, nil, ZP);
+ if(boxes != nil && nboxes == 0){
+ string(screen, addpt(sr.min, Pt(Padding, Padding)), cols->text, ZP, font, "No result found.");
+ return;
+ }
replclipr(screen, 0, boxr);
vmin = boxr.min.y + offset;
vmax = boxr.max.y + offset;