From 9e3f5502a3b7a6709aebe875c3d78a57d9d7ad54 Mon Sep 17 00:00:00 2001 From: PatR Date: Sat, 3 Dec 2022 23:51:00 -0800 Subject: [PATCH] farlook /[mMoO] feedback, take II Redo the way coordinate pairs are lined up for /m /O &c. Original | <8,9> $ gold pieces | <10,10> * rocks | <9,12> % newt corpse Previous | <8, 9> $ gold pieces | <10,10> * rocks | <9,12> % newt corpse Now | <8,9> $ gold pieces | <10,10> * rocks | <9,12> % newt corpse Override right justification instead of inserting a space. It looks better for the situation where all y values are 1 digit. --- src/pager.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pager.c b/src/pager.c index aba563b5e..fd7d1bd36 100644 --- a/src/pager.c +++ b/src/pager.c @@ -1726,9 +1726,10 @@ look_all( and 2 digit values; done unconditionally because we would need two passes over the map to determine whether y width is uniform or a mixture; x width is not a factor - because the result gets right-justified by %8s */ + because the result gets right-justified by %8s; adding + a trailing space effectively pushes non-space text left */ if (cmode == GPCOORDS_MAP && y < 10) - (void) strsubst(coordbuf, ",", ", "); + (void) strkitten(coordbuf, ' '); /* prefix: "coords C " where 'C' is mon or obj symbol */ Sprintf(outbuf, (cmode == GPCOORDS_SCREEN) ? "%s " : (cmode == GPCOORDS_MAP) ? "%8s "