aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Edmund Lazo <janedmundlazo@hotmail.com>2018-08-01 12:09:05 -0400
committerJan Edmund Lazo <janedmundlazo@hotmail.com>2018-08-06 21:56:39 -0400
commite6127a49db3fbc14f982775856ee7bd29fe29ec6 (patch)
tree873d8b4eb2b4c943aaeac2b391fb6ce16341af12
parentf807a7de04f6bca409bb9a1b2b07f53a90afb25c (diff)
downloadrneovim-e6127a49db3fbc14f982775856ee7bd29fe29ec6.tar.gz
rneovim-e6127a49db3fbc14f982775856ee7bd29fe29ec6.tar.bz2
rneovim-e6127a49db3fbc14f982775856ee7bd29fe29ec6.zip
edit: temp in ins_del() is const int
-rw-r--r--src/nvim/edit.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/nvim/edit.c b/src/nvim/edit.c
index 4945b2b3c8..faf0cebea5 100644
--- a/src/nvim/edit.c
+++ b/src/nvim/edit.c
@@ -7475,12 +7475,11 @@ static void ins_shift(int c, int lastc)
static void ins_del(void)
{
- int temp;
-
- if (stop_arrow() == FAIL)
+ if (stop_arrow() == FAIL) {
return;
- if (gchar_cursor() == NUL) { /* delete newline */
- temp = curwin->w_cursor.col;
+ }
+ if (gchar_cursor() == NUL) { // delete newline
+ const int temp = curwin->w_cursor.col;
if (!can_bs(BS_EOL) // only if "eol" included
|| do_join(2, false, true, false, false) == FAIL) {
vim_beep(BO_BS);