diff options
author | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2021-11-01 01:03:08 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-31 17:03:08 -0700 |
commit | a68faed02dc8e37b8f10da14dc02e33e6ed93947 (patch) | |
tree | 992c62bd3451d829d4b91fef527d3f4254254bcc /src/nvim/eval | |
parent | 5ad15c9fa1ac6e6b2acfc2fe5e20148adeb85eb3 (diff) | |
download | rneovim-a68faed02dc8e37b8f10da14dc02e33e6ed93947.tar.gz rneovim-a68faed02dc8e37b8f10da14dc02e33e6ed93947.tar.bz2 rneovim-a68faed02dc8e37b8f10da14dc02e33e6ed93947.zip |
refactor: saner options for uncrustify #16196
* refactor: general good option changes
sp_deref = remove
sp_not = remove
sp_inv = remove
sp_inside_paren_cast = remove
mod_remove_duplicate_include = true
sp_after_semi = add
sp_after_semi_for = force
sp_sizeof_paren = remove
nl_return_expr = remove
nl_else_brace = remove
nl_else_if = remove
* refactor: mod_remove_extra_semicolon = true
* refactor: nl_max = 3
* refactor: sp_bool = force
* refactor: sp_compare = force
* refactor: sp_inside_paren = remove
* refactor: sp_paren_paren = remove
* refactor: sp_inside_sparen = remove
* refactor: sp_before_sparen = force
* refactor: sp_sign = remove
* refactor: sp_addr = remove
* refactor: sp_member = remove
* refactor: nl_struct_brace = remove
* refactor: nl_before_if_closing_paren = remove
* refactor: nl_fdef_brace = force
* refactor: sp_paren_comma = force
* refactor: mod_full_brace_do = add
Diffstat (limited to 'src/nvim/eval')
-rw-r--r-- | src/nvim/eval/funcs.c | 13 | ||||
-rw-r--r-- | src/nvim/eval/typval.c | 2 | ||||
-rw-r--r-- | src/nvim/eval/typval.h | 2 | ||||
-rw-r--r-- | src/nvim/eval/userfunc.c | 4 |
4 files changed, 10 insertions, 11 deletions
diff --git a/src/nvim/eval/funcs.c b/src/nvim/eval/funcs.c index 29f7d22317..eb7d62d7a2 100644 --- a/src/nvim/eval/funcs.c +++ b/src/nvim/eval/funcs.c @@ -738,7 +738,8 @@ static void buf_win_common(typval_T *argvars, typval_T *rettv, bool get_nr) } /// "bufwinid(nr)" function -static void f_bufwinid(typval_T *argvars, typval_T *rettv, FunPtr fptr) { +static void f_bufwinid(typval_T *argvars, typval_T *rettv, FunPtr fptr) +{ buf_win_common(argvars, rettv, false); } @@ -1812,7 +1813,7 @@ static void f_deletebufline(typval_T *argvars, typval_T *rettv, FunPtr fptr) if (wp->w_buffer == buf) { if (wp->w_cursor.lnum > last) { wp->w_cursor.lnum -= count; - } else if (wp->w_cursor.lnum> first) { + } else if (wp->w_cursor.lnum > first) { wp->w_cursor.lnum = first; } if (wp->w_cursor.lnum > wp->w_buffer->b_ml.ml_line_count) { @@ -4620,10 +4621,9 @@ static bool has_wsl(void) static TriState has_wsl = kNone; if (has_wsl == kNone) { Error err = ERROR_INIT; - Object o = nlua_exec( - STATIC_CSTR_AS_STRING("return vim.loop.os_uname()['release']:lower()" - ":match('microsoft') and true or false"), - (Array)ARRAY_DICT_INIT, &err); + Object o = nlua_exec(STATIC_CSTR_AS_STRING("return vim.loop.os_uname()['release']:lower()" + ":match('microsoft') and true or false"), + (Array)ARRAY_DICT_INIT, &err); assert(!ERROR_SET(&err)); assert(o.type == kObjectTypeBoolean); has_wsl = o.data.boolean ? kTrue : kFalse; @@ -11245,7 +11245,6 @@ static void f_tabpagenr(typval_T *argvars, typval_T *rettv, FunPtr fptr) } - /* * Common code for tabpagewinnr() and winnr(). */ diff --git a/src/nvim/eval/typval.c b/src/nvim/eval/typval.c index 4e845cffdd..811a1d40dd 100644 --- a/src/nvim/eval/typval.c +++ b/src/nvim/eval/typval.c @@ -3162,7 +3162,7 @@ int tv_check_for_nonempty_string(const typval_T *const tv) FUNC_ATTR_NONNULL_ALL FUNC_ATTR_WARN_UNUSED_RESULT FUNC_ATTR_PURE { if (tv_check_for_string(tv) == FAIL) { - return FAIL; + return FAIL; } if (tv->vval.v_string == NULL || *tv->vval.v_string == NUL) { EMSG(_(e_non_empty_string_required)); diff --git a/src/nvim/eval/typval.h b/src/nvim/eval/typval.h index 994bce899d..843f879ed0 100644 --- a/src/nvim/eval/typval.h +++ b/src/nvim/eval/typval.h @@ -831,7 +831,7 @@ extern bool tv_in_free_unref_items; /// @param li Name of the variable with current listitem_T entry. /// @param code Cycle body. #define TV_LIST_ITER(l, li, code) \ - _TV_LIST_ITER_MOD(, l, li, code) + _TV_LIST_ITER_MOD( , l, li, code) /// Iterate over a list /// diff --git a/src/nvim/eval/userfunc.c b/src/nvim/eval/userfunc.c index 3c7532df7b..6a01cbba5c 100644 --- a/src/nvim/eval/userfunc.c +++ b/src/nvim/eval/userfunc.c @@ -2349,7 +2349,7 @@ void ex_function(exarg_T *eap) // heredoc: Check for ":python <<EOF", ":lua <<EOF", etc. arg = skipwhite(skiptowhite(p)); - if (arg[0] == '<' && arg[1] =='<' + if (arg[0] == '<' && arg[1] == '<' && ((p[0] == 'p' && p[1] == 'y' && (!ASCII_ISALNUM(p[2]) || p[2] == 't' || ((p[2] == '3' || p[2] == 'x') @@ -2383,7 +2383,7 @@ void ex_function(exarg_T *eap) arg = skipwhite(skiptowhite(arg)); if (arg[0] == '=' && arg[1] == '<' - && arg[2] =='<' + && arg[2] == '<' && (p[0] == 'l' && p[1] == 'e' && (!ASCII_ISALNUM(p[2]) |