aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordundargoc <gocdundar@gmail.com>2023-10-07 00:15:09 +0200
committerdundargoc <33953936+dundargoc@users.noreply.github.com>2023-10-07 10:11:22 +0200
commit7f65431d90e18819009c30aa3ee2a680d3b3958d (patch)
tree2f728d80f9f0b1b6b796af8065fdafc1d8c07077
parent7e9407490c51da5e677e5aea5eb48200600effbc (diff)
downloadrneovim-7f65431d90e18819009c30aa3ee2a680d3b3958d.tar.gz
rneovim-7f65431d90e18819009c30aa3ee2a680d3b3958d.tar.bz2
rneovim-7f65431d90e18819009c30aa3ee2a680d3b3958d.zip
vim-patch:9.0.1997: Some unused code in move.c and string.c
Problem: Some unused code in move.c and string.c Solution: Remove it closes: vim/vim#13288 https://github.com/vim/vim/commit/580c1fcb4ad85360cd3a361c3c8e37b534153d60 Co-authored-by: dundargoc <gocdundar@gmail.com>
-rw-r--r--src/nvim/move.c2
-rw-r--r--src/nvim/strings.c6
2 files changed, 3 insertions, 5 deletions
diff --git a/src/nvim/move.c b/src/nvim/move.c
index 55cd90c5ae..8eaf40d135 100644
--- a/src/nvim/move.c
+++ b/src/nvim/move.c
@@ -1313,7 +1313,6 @@ bool scrolldown(long line_count, int byfold)
}
if (col > width2 && width2 > 0) {
row += (int)col / width2;
- col = col % width2;
}
if (row >= curwin->w_height_inner) {
curwin->w_curswant = curwin->w_virtcol - (row - curwin->w_height_inner + 1) * width2;
@@ -1518,7 +1517,6 @@ void adjust_skipcol(void)
}
if (col > width2) {
row += (int)col / width2;
- col = col % width2;
}
if (row >= curwin->w_height_inner) {
if (curwin->w_skipcol == 0) {
diff --git a/src/nvim/strings.c b/src/nvim/strings.c
index 7ba11ed8e5..cc66f917f8 100644
--- a/src/nvim/strings.c
+++ b/src/nvim/strings.c
@@ -1079,7 +1079,7 @@ static int parse_fmt_types(const char ***ap_types, int *num_posarg, const char *
any_arg = 1;
CHECK_POS_ARG;
}
- } else if (ascii_isdigit((int)(*(arg = p)))) {
+ } else if (ascii_isdigit((int)(*p))) {
// size_t could be wider than unsigned int; make sure we treat
// argument like common implementations do
unsigned uj = (unsigned)(*p++ - '0');
@@ -1126,7 +1126,7 @@ static int parse_fmt_types(const char ***ap_types, int *num_posarg, const char *
any_arg = 1;
CHECK_POS_ARG;
}
- } else if (ascii_isdigit((int)(*(arg = p)))) {
+ } else if (ascii_isdigit((int)(*p))) {
// size_t could be wider than unsigned int; make sure we
// treat argument like common implementations do
unsigned uj = (unsigned)(*p++ - '0');
@@ -1155,7 +1155,7 @@ static int parse_fmt_types(const char ***ap_types, int *num_posarg, const char *
p++;
if (length_modifier == 'l' && *p == 'l') {
// double l = long long
- length_modifier = 'L';
+ // length_modifier = 'L';
p++;
}
}