aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/mapping.c
diff options
context:
space:
mode:
authorii14 <59243201+ii14@users.noreply.github.com>2023-04-07 21:08:16 +0200
committerGitHub <noreply@github.com>2023-04-07 21:08:16 +0200
commit04933b1ea968f958d2541dd65fd33ebb503caac3 (patch)
tree430e333892c440dccce4d1b4606c83ab36f817c5 /src/nvim/mapping.c
parent9408f2dcf7cade2631688300e9b58eed6bc5219a (diff)
downloadrneovim-04933b1ea968f958d2541dd65fd33ebb503caac3.tar.gz
rneovim-04933b1ea968f958d2541dd65fd33ebb503caac3.tar.bz2
rneovim-04933b1ea968f958d2541dd65fd33ebb503caac3.zip
refactor: remove redundant casts
Diffstat (limited to 'src/nvim/mapping.c')
-rw-r--r--src/nvim/mapping.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/mapping.c b/src/nvim/mapping.c
index 1887afef1c..68a3778a47 100644
--- a/src/nvim/mapping.c
+++ b/src/nvim/mapping.c
@@ -596,13 +596,13 @@ static int buf_do_map(int maptype, MapArguments *args, int mode, bool is_abbrev,
int last = first;
p = (char *)lhs + utfc_ptr2len((char *)lhs);
n = 1;
- while (p < (char *)lhs + len) {
+ while (p < lhs + len) {
n++; // nr of (multi-byte) chars
last = vim_iswordp(p); // type of last char
if (same == -1 && last != first) {
same = n - 1; // count of same char type
}
- p += utfc_ptr2len((char *)p);
+ p += utfc_ptr2len(p);
}
if (last && n > 2 && same >= 0 && same < n - 1) {
retval = 1;