From 0d6cd2b8087d9ae7fdb2b70fcc40ecaf378b0af7 Mon Sep 17 00:00:00 2001 From: watiko Date: Tue, 16 Feb 2016 02:26:06 +0900 Subject: option_defs.h: Introduce SHM_ABBREVIATIONS Helped-by: ZyX --- src/nvim/option.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'src/nvim/option.c') diff --git a/src/nvim/option.c b/src/nvim/option.c index 4bf7ec5405..9aa2b145e8 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -6163,16 +6163,14 @@ int has_format_option(int x) return vim_strchr(curbuf->b_p_fo, x) != NULL; } -/* - * Return TRUE if "x" is present in 'shortmess' option, or - * 'shortmess' contains 'a' and "x" is present in SHM_A. - */ -int shortmess(int x) +/// @returns true if "x" is present in 'shortmess' option, or +/// 'shortmess' contains 'a' and "x" is present in SHM_ALL_ABBREVIATIONS. +bool shortmess(int x) { return p_shm != NULL && - ( vim_strchr(p_shm, x) != NULL - || (vim_strchr(p_shm, 'a') != NULL - && vim_strchr((char_u *)SHM_A, x) != NULL)); + (vim_strchr(p_shm, x) != NULL + || (vim_strchr(p_shm, 'a') != NULL + && vim_strchr((char_u *)SHM_ALL_ABBREVIATIONS, x) != NULL)); } /* -- cgit