mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
notifications: use \e[22m to disable bold
\e[21m was previously used to disable bold. That changed a while ago, to align foot with the majority of other terminal emulators. \e[22m now disables both bold and dim. When this change was done, the user notifications were not updated, meaning the ‘message’ part was always in bold. This was never the intended behavior.
This commit is contained in:
parent
ebc0bc83e0
commit
b75bd6507a
2 changed files with 10 additions and 7 deletions
11
config.c
11
config.c
|
|
@ -633,14 +633,17 @@ parse_section_main(const char *key, const char *value, struct config *conf,
|
|||
}
|
||||
|
||||
else if (strcmp(key, "bell") == 0) {
|
||||
LOG_WARN("deprecated: %s:%d: [default]: bell: set actions in section '[bell]' instead", path, lineno);
|
||||
LOG_WARN(
|
||||
"deprecated: %s:%d: [default]: bell: "
|
||||
"set actions in section '[bell]' instead", path, lineno);
|
||||
|
||||
const char fmt[] = "%s:%d \033[1mbell\033[21m, use section \033[1m[bell]\033[21m instead";
|
||||
char *text = xasprintf(fmt, path, lineno);
|
||||
const char fmt[] =
|
||||
"%s:%d: \033[1mbell\033[22m, use \033[1murgent\033[22m in "
|
||||
"the \033[1m[bell]\033[22m section instead";
|
||||
|
||||
struct user_notification deprecation = {
|
||||
.kind = USER_NOTIFICATION_DEPRECATED,
|
||||
.text = text,
|
||||
.text = xasprintf(fmt, path, lineno),
|
||||
};
|
||||
tll_push_back(conf->notifications, deprecation);
|
||||
|
||||
|
|
|
|||
6
slave.c
6
slave.c
|
|
@ -79,15 +79,15 @@ emit_one_notification(int fd, const struct user_notification *notif)
|
|||
|
||||
switch (notif->kind) {
|
||||
case USER_NOTIFICATION_DEPRECATED:
|
||||
prefix = "\033[33;1mdeprecated\033[39;21m: ";
|
||||
prefix = "\033[33;1mdeprecated\033[39;22m: ";
|
||||
break;
|
||||
|
||||
case USER_NOTIFICATION_WARNING:
|
||||
prefix = "\033[33;1mwarning\033[39;21m: ";
|
||||
prefix = "\033[33;1mwarning\033[39;22m: ";
|
||||
break;
|
||||
|
||||
case USER_NOTIFICATION_ERROR:
|
||||
prefix = "\033[31;1merror\033[39;21m: ";
|
||||
prefix = "\033[31;1merror\033[39;22m: ";
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue