\#timeout for regions
Support tab separation for the region portion of #timeout output. This works ok under Qt. However, the output from #timeout uses a fixed-width font so tab separation isn't necessary. No idea how well it will work for mswin.
This commit is contained in:
+3
-2
@@ -659,6 +659,7 @@ visible_region_summary(winid win)
|
|||||||
NhRegion *reg;
|
NhRegion *reg;
|
||||||
char buf[BUFSZ], typbuf[QBUFSZ];
|
char buf[BUFSZ], typbuf[QBUFSZ];
|
||||||
int i, damg, hdr_done = 0;
|
int i, damg, hdr_done = 0;
|
||||||
|
const char *fldsep = iflags.menu_tab_sep ? "\t" : " ";
|
||||||
|
|
||||||
for (i = 0; i < svn.n_regions; i++) {
|
for (i = 0; i < svn.n_regions; i++) {
|
||||||
reg = gr.regions[i];
|
reg = gr.regions[i];
|
||||||
@@ -684,8 +685,8 @@ visible_region_summary(winid win)
|
|||||||
Sprintf(typbuf, "poison gas (%d)", damg);
|
Sprintf(typbuf, "poison gas (%d)", damg);
|
||||||
else
|
else
|
||||||
Strcpy(typbuf, "vapor");
|
Strcpy(typbuf, "vapor");
|
||||||
Sprintf(eos(buf), " %-16s", typbuf);
|
Sprintf(eos(buf), "%s%-16s", fldsep, typbuf);
|
||||||
Sprintf(eos(buf), " @[%d,%d..%d,%d]",
|
Sprintf(eos(buf), "%s@[%d,%d..%d,%d]", fldsep,
|
||||||
reg->bounding_box.lx, reg->bounding_box.ly,
|
reg->bounding_box.lx, reg->bounding_box.ly,
|
||||||
reg->bounding_box.hx, reg->bounding_box.hy);
|
reg->bounding_box.hx, reg->bounding_box.hy);
|
||||||
putstr(win, 0, buf);
|
putstr(win, 0, buf);
|
||||||
|
|||||||
Reference in New Issue
Block a user