Module Name: src
Committed By: martin
Date: Mon Jan 21 20:28:09 UTC 2019
Modified Files:
src/usr.bin/msgc: msg_sys.def
Log Message:
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).
To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/usr.bin/msgc/msg_sys.def
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/msgc/msg_sys.def
diff -u src/usr.bin/msgc/msg_sys.def:1.41 src/usr.bin/msgc/msg_sys.def:1.42
--- src/usr.bin/msgc/msg_sys.def:1.41 Tue Mar 6 16:26:01 2012
+++ src/usr.bin/msgc/msg_sys.def Mon Jan 21 20:28:08 2019
@@ -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 @@ msg_prompt_win(msg msg_no, int x, int y,
}
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)