aboutsummaryrefslogtreecommitdiff
path: root/vis-cmds.c
diff options
context:
space:
mode:
authorRandy Palamar <palamar@ualberta.ca>2023-08-26 14:54:22 -0600
committerRandy Palamar <palamar@ualberta.ca>2023-08-26 14:55:30 -0600
commit514fae450a53d6887f07aae729348c8fbbb52225 (patch)
tree9987242aef737d9a4617909c90198e68a745a724 /vis-cmds.c
parent2c5e6928f42e5bc5968e8413ef304919b9d839a9 (diff)
downloadvis-514fae450a53d6887f07aae729348c8fbbb52225.tar.gz
vis-514fae450a53d6887f07aae729348c8fbbb52225.tar.xz
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.
Diffstat (limited to 'vis-cmds.c')
-rw-r--r--vis-cmds.c3
1 files changed, 3 insertions, 0 deletions
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;