Fix up FreeBSD CTRL handling in vi mode
Not sure how great this is but it works. We can make it nicer later.
Fix #595686a43a94dfe6a1217256a6d99991a0323f5f18
vi.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/vi.c b/vi.c
@@ -22,9 +22,12 @@
#include "sh.h"
#include "edit.h"
-#ifndef CTRL
-#define CTRL(c) (c & 0x1f)
+#if !defined(CTRL) || defined(__FreeBSD__)
+#ifdef __FreeBSD__
+#undef CTRL
#endif
+#define CTRL(c) (c & 0x1f)
+#endif /* !CTRL || __FreeBSD__ */
struct edstate {
char *cbuf; /* main buffer to build the command line */