From 514fae450a53d6887f07aae729348c8fbbb52225 Mon Sep 17 00:00:00 2001 From: Randy Palamar Date: Sat, 26 Aug 2023 14:54:22 -0600 Subject: support old option names but mark as deprecated This is in response to a comment left on a35e7ea. Backwards compatibility is a good idea for at least a release. --- vis-cmds.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'vis-cmds.c') diff --git a/vis-cmds.c b/vis-cmds.c index f5f8d5b..bf567bf 100644 --- a/vis-cmds.c +++ b/vis-cmds.c @@ -185,6 +185,9 @@ static bool cmd_set(Vis *vis, Win *win, Command *cmd, const char *argv[], Select return false; } + if (opt->flags & VIS_OPTION_DEPRECATED && strcmp(opt->context, name) == 0) + vis_info_show(vis, "%s is deprecated and will be removed in the next release", name); + if (!win && (opt->flags & VIS_OPTION_NEED_WINDOW)) { vis_info_show(vis, "Need active window for `:set %s'", name); return false; -- cgit v1.2.3