diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2018-06-16 11:55:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-16 11:55:40 +0200 |
commit | 4c3c04d03cc0cdbccfb71b534fc3cd238fd3974d (patch) | |
tree | 22e59e2f57c824369bd8d5f0d561f42303886229 /src/nvim/charset.h | |
parent | c990d65c37ded9ad9f4002a6eb6ec36aa29b4fe3 (diff) | |
parent | f419f914fc52fc86216b59e8ffa6fd510f79c6cd (diff) | |
download | rneovim-4c3c04d03cc0cdbccfb71b534fc3cd238fd3974d.tar.gz rneovim-4c3c04d03cc0cdbccfb71b534fc3cd238fd3974d.tar.bz2 rneovim-4c3c04d03cc0cdbccfb71b534fc3cd238fd3974d.zip |
Merge #8526 from janlazo/vim-8.0.0451
Diffstat (limited to 'src/nvim/charset.h')
-rw-r--r-- | src/nvim/charset.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/nvim/charset.h b/src/nvim/charset.h index eb64b6128a..e657ce19b6 100644 --- a/src/nvim/charset.h +++ b/src/nvim/charset.h @@ -5,6 +5,7 @@ #include "nvim/pos.h" #include "nvim/buffer_defs.h" #include "nvim/eval/typval.h" +#include "nvim/option_defs.h" /// Return the folded-case equivalent of the given character /// @@ -34,4 +35,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 |