vis
a vi-like editor based on Plan 9's structural regular expressions
git clone https://9o.is/git/vis.git
commit 6f7e97347adbc3a0f22433ec95a8cc56b19b6c7b parent 2c3463c0b3ab7f98fe2127264f2cd0f4875b0bb9 Author: Marc André Tanner <mat@brain-dump.org> Date: Thu, 14 Jan 2016 19:02:49 +0100 vis-cmds: resolve conflict with BSD getmode(3) Closes #147 Diffstat:
| M | vis-cmds.c | | | 6 | +++--- |
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/vis-cmds.c b/vis-cmds.c @@ -912,7 +912,7 @@ static bool cmd_help(Vis *vis, Filerange *range, enum CmdOpt opt, const char *ar return true; } -static enum VisMode getmode(const char *mode) { +static enum VisMode str2vismode(const char *mode) { const char *modes[] = { [VIS_MODE_NORMAL] = "normal", [VIS_MODE_OPERATOR_PENDING] = "operator-pending", @@ -931,7 +931,7 @@ static enum VisMode getmode(const char *mode) { static bool cmd_map(Vis *vis, Filerange *range, enum CmdOpt opt, const char *argv[]) { bool local = strstr(argv[0], "-") != NULL; - enum VisMode mode = getmode(argv[1]); + enum VisMode mode = str2vismode(argv[1]); const char *lhs = argv[2]; const char *rhs = argv[3]; @@ -988,7 +988,7 @@ static bool cmd_map(Vis *vis, Filerange *range, enum CmdOpt opt, const char *arg static bool cmd_unmap(Vis *vis, Filerange *range, enum CmdOpt opt, const char *argv[]) { bool local = strstr(argv[0], "-") != NULL; - enum VisMode mode = getmode(argv[1]); + enum VisMode mode = str2vismode(argv[1]); const char *lhs = argv[2]; if (mode == VIS_MODE_LAST || !lhs) {