diff options
author | dundargoc <gocdundar@gmail.com> | 2023-12-16 22:14:28 +0100 |
---|---|---|
committer | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2023-12-18 16:22:13 +0100 |
commit | 6cb78e2d1c4c6c63c628c965076a07ce5f7adbb6 (patch) | |
tree | 20bfbe8b317fde86121fcf9af10975b2b95e5758 /src/nvim/edit.c | |
parent | 8c173cec295cf8c78bdbc440dc87f0473560f69a (diff) | |
download | rneovim-6cb78e2d1c4c6c63c628c965076a07ce5f7adbb6.tar.gz rneovim-6cb78e2d1c4c6c63c628c965076a07ce5f7adbb6.tar.bz2 rneovim-6cb78e2d1c4c6c63c628c965076a07ce5f7adbb6.zip |
docs: add style rule regarding initialization
Specifically, specify that each initialization should be done on a
separate line.
Diffstat (limited to 'src/nvim/edit.c')
-rw-r--r-- | src/nvim/edit.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/nvim/edit.c b/src/nvim/edit.c index ba2885a162..0fcb665f0f 100644 --- a/src/nvim/edit.c +++ b/src/nvim/edit.c @@ -3008,7 +3008,6 @@ bool in_cinkeys(int keytyped, int when, bool line_is_empty) int try_match; int try_match_word; char *p; - char *line; bool icase; if (keytyped == NUL) { @@ -3150,7 +3149,7 @@ bool in_cinkeys(int keytyped, int when, bool line_is_empty) // Just completed a word, check if it starts with "look". // search back for the start of a word. - line = get_cursor_line_ptr(); + char *line = get_cursor_line_ptr(); for (s = line + curwin->w_cursor.col; s > line; s = n) { n = mb_prevptr(line, s); if (!vim_iswordp(n)) { @@ -3169,7 +3168,7 @@ bool in_cinkeys(int keytyped, int when, bool line_is_empty) if (keytyped == (int)(uint8_t)p[-1] || (icase && keytyped < 256 && TOLOWER_LOC(keytyped) == TOLOWER_LOC((uint8_t)p[-1]))) { - line = get_cursor_pos_ptr(); + char *line = get_cursor_pos_ptr(); assert(p >= look && (uintmax_t)(p - look) <= SIZE_MAX); if ((curwin->w_cursor.col == (colnr_T)(p - look) || !vim_iswordc((uint8_t)line[-(p - look) - 1])) |