diff options
| author | Randy Palamar <palamar@ualberta.ca> | 2023-08-26 14:54:22 -0600 |
|---|---|---|
| committer | Randy Palamar <palamar@ualberta.ca> | 2023-08-26 14:55:30 -0600 |
| commit | 514fae450a53d6887f07aae729348c8fbbb52225 (patch) | |
| tree | 9987242aef737d9a4617909c90198e68a745a724 /sam.c | |
| parent | 2c5e6928f42e5bc5968e8413ef304919b9d839a9 (diff) | |
| download | vis-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 'sam.c')
| -rw-r--r-- | sam.c | 30 |
1 files changed, 20 insertions, 10 deletions
@@ -332,24 +332,32 @@ static const OptionDef options[] = { VIS_HELP("Number of spaces to display (and insert if `expandtab` is enabled) for a tab") }, [OPTION_SHOW_SPACES] = { - { "showspaces" }, - VIS_OPTION_TYPE_BOOL|VIS_OPTION_NEED_WINDOW, + { "showspaces", "show-spaces" }, + VIS_OPTION_TYPE_BOOL|VIS_OPTION_NEED_WINDOW|VIS_OPTION_DEPRECATED, VIS_HELP("Display replacement symbol instead of a space") + NULL, + "show-spaces" }, [OPTION_SHOW_TABS] = { - { "showtabs" }, - VIS_OPTION_TYPE_BOOL|VIS_OPTION_NEED_WINDOW, + { "showtabs", "show-tabs" }, + VIS_OPTION_TYPE_BOOL|VIS_OPTION_NEED_WINDOW|VIS_OPTION_DEPRECATED, VIS_HELP("Display replacement symbol for tabs") + NULL, + "show-tabs" }, [OPTION_SHOW_NEWLINES] = { - { "shownewlines" }, - VIS_OPTION_TYPE_BOOL|VIS_OPTION_NEED_WINDOW, + { "shownewlines", "show-newlines" }, + VIS_OPTION_TYPE_BOOL|VIS_OPTION_NEED_WINDOW|VIS_OPTION_DEPRECATED, VIS_HELP("Display replacement symbol for newlines") + NULL, + "show-newlines" }, [OPTION_SHOW_EOF] = { - { "showeof" }, - VIS_OPTION_TYPE_BOOL|VIS_OPTION_NEED_WINDOW, + { "showeof", "show-eof" }, + VIS_OPTION_TYPE_BOOL|VIS_OPTION_NEED_WINDOW|VIS_OPTION_DEPRECATED, VIS_HELP("Display replacement symbol for lines after the end of the file") + NULL, + "show-eof" }, [OPTION_NUMBER] = { { "numbers", "nu" }, @@ -382,9 +390,11 @@ static const OptionDef options[] = { VIS_HELP("How to load existing files 'auto', 'read' or 'mmap'") }, [OPTION_CHANGE_256COLORS] = { - { "change256colors" }, - VIS_OPTION_TYPE_BOOL, + { "change256colors", "change-256colors" }, + VIS_OPTION_TYPE_BOOL|VIS_OPTION_DEPRECATED, VIS_HELP("Change 256 color palette to support 24bit colors") + NULL, + "change-256colors" }, [OPTION_LAYOUT] = { { "layout" }, |
