Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/msgc msg_prompt_win: if the default string fits, sho...
details: https://anonhg.NetBSD.org/src/rev/c21e4315ee3b
branches: trunk
changeset: 447698:c21e4315ee3b
user: martin <martin%NetBSD.org@localhost>
date: Mon Jan 21 20:28:08 2019 +0000
description:
msg_prompt_win: if the default string fits, show it separately even
in fixed size windows. Previously it would only show up when auto-sizing
prompts figured it would fit (probably an oversight).
diffstat:
usr.bin/msgc/msg_sys.def | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diffs (20 lines):
diff -r 8026cf796b74 -r c21e4315ee3b usr.bin/msgc/msg_sys.def
--- a/usr.bin/msgc/msg_sys.def Mon Jan 21 20:22:48 2019 +0000
+++ b/usr.bin/msgc/msg_sys.def Mon Jan 21 20:28:08 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: msg_sys.def,v 1.41 2012/03/06 16:26:01 mbalmer Exp $ */
+/* $NetBSD: msg_sys.def,v 1.42 2019/01/21 20:28:08 martin Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -505,6 +505,10 @@
}
w = maxx;
}
+ } else if (w > 0 && def != NULL && *def != 0) {
+ size_t tl = strlen(def);
+ if (tl + 1 + 2 + val_buf_len + 1 < (unsigned)w)
+ msg_flags &= ~MSG_PROMPT_HIDE_DFLT;
}
if (x == -1)
Home |
Main Index |
Thread Index |
Old Index