aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/digraph.c
diff options
context:
space:
mode:
authordundargoc <gocdundar@gmail.com>2023-11-12 15:54:54 +0100
committerdundargoc <33953936+dundargoc@users.noreply.github.com>2023-11-13 23:39:56 +0100
commit28f4f3c48498086307ed825d1761edb5789ca0e8 (patch)
tree880d2104092261fe0457b17a9ddda8a6e0f7f2ed /src/nvim/digraph.c
parent48bcc7b9710d6db619b05254ea87f4087cdd9764 (diff)
downloadrneovim-28f4f3c48498086307ed825d1761edb5789ca0e8.tar.gz
rneovim-28f4f3c48498086307ed825d1761edb5789ca0e8.tar.bz2
rneovim-28f4f3c48498086307ed825d1761edb5789ca0e8.zip
refactor: follow style guide
- reduce variable scope - prefer initialization over declaration and assignment - use bool to represent boolean values
Diffstat (limited to 'src/nvim/digraph.c')
-rw-r--r--src/nvim/digraph.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/nvim/digraph.c b/src/nvim/digraph.c
index b29b5aed72..bc0ce99c5e 100644
--- a/src/nvim/digraph.c
+++ b/src/nvim/digraph.c
@@ -2074,8 +2074,6 @@ char *keymap_init(void)
/// @param eap
void ex_loadkeymap(exarg_T *eap)
{
- char *s;
-
#define KMAP_LLEN 200 // max length of "to" and "from" together
char buf[KMAP_LLEN + 11];
char *save_cpo = p_cpo;
@@ -2106,7 +2104,7 @@ void ex_loadkeymap(exarg_T *eap)
if ((*p != '"') && (*p != NUL)) {
kmap_T *kp = GA_APPEND_VIA_PTR(kmap_T, &curbuf->b_kmap_ga);
- s = skiptowhite(p);
+ char *s = skiptowhite(p);
kp->from = xmemdupz(p, (size_t)(s - p));
p = skipwhite(s);
s = skiptowhite(p);