aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/mbyte_defs.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/mbyte_defs.h')
-rw-r--r--src/nvim/mbyte_defs.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/nvim/mbyte_defs.h b/src/nvim/mbyte_defs.h
index e913e20f9f..2904047223 100644
--- a/src/nvim/mbyte_defs.h
+++ b/src/nvim/mbyte_defs.h
@@ -1,9 +1,13 @@
-#ifndef NVIM_MBYTE_DEFS_H
-#define NVIM_MBYTE_DEFS_H
+#pragma once
#include <stdbool.h>
-#include "nvim/iconv.h"
+#include "nvim/iconv_defs.h"
+
+/// Maximum number of bytes in a multi-byte character. It can be one 32-bit
+/// character of up to 6 bytes, or one 16-bit character of up to three bytes
+/// plus six following composing characters of three bytes each.
+enum { MB_MAXBYTES = 21, };
/// max length of an unicode char
enum { MB_MAXCHAR = 6, };
@@ -50,5 +54,3 @@ typedef struct {
bool vc_fail; ///< What to do with invalid characters: if true, fail,
///< otherwise use '?'.
} vimconv_T;
-
-#endif // NVIM_MBYTE_DEFS_H