diff options
Diffstat (limited to 'src/nvim/charset.h')
-rw-r--r-- | src/nvim/charset.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/nvim/charset.h b/src/nvim/charset.h index eb64b6128a..cc9f3102f7 100644 --- a/src/nvim/charset.h +++ b/src/nvim/charset.h @@ -34,4 +34,15 @@ typedef enum { #ifdef INCLUDE_GENERATED_DECLARATIONS # include "charset.h.generated.h" #endif + +static inline bool vim_isbreak(int c) + REAL_FATTR_CONST + REAL_FATTR_ALWAYS_INLINE; + +/// Check if `c` is one of the characters in 'breakat'. +/// Used very often if 'linebreak' is set +static inline bool vim_isbreak(int c) +{ + return breakat_flags[(char_u)c]; +} #endif // NVIM_CHARSET_H |