config: remove support for default.geometry

This commit is contained in:
Daniel Eklöf 2020-12-08 19:53:36 +01:00
parent 6ec63eae00
commit 386796cec6
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
2 changed files with 2 additions and 16 deletions

View file

@ -101,6 +101,7 @@ means foot can be PGO:d in e.g. sandboxed build scripts. See
* Support for loading configuration from `$XDG_CONFIG_HOME/footrc`.
* **scrollback** option from `foot.ini`.
* **geometry** option from `foot.ini`.
### Fixed

View file

@ -436,22 +436,7 @@ parse_section_main(const char *key, const char *value, struct config *conf,
conf->app_id = xstrdup(value);
}
else if (strcmp(key, "initial-window-size-pixels") == 0 ||
strcmp(key, "geometry") == 0 /* deprecated */)
{
if (strcmp(key, "geometry") == 0) {
LOG_WARN("deprecated: %s:%d: [default]: geometry: use 'initial-window-size-pixels' instead'", path, lineno);
const char fmt[] = "%s:%d: \033[1mgeometry\033[21m, use \033[1minitial-window-size-pixels\033[21m instead";
char *text = xasprintf(fmt, path, lineno);
struct user_notification deprecation = {
.kind = USER_NOTIFICATION_DEPRECATED,
.text = text,
};
tll_push_back(conf->notifications, deprecation);
}
else if (strcmp(key, "initial-window-size-pixels") == 0) {
unsigned width, height;
if (sscanf(value, "%ux%u", &width, &height) != 2 || width == 0 || height == 0) {
LOG_AND_NOTIFY_ERR(