aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2018-09-18 07:21:24 +0200
committerGitHub <noreply@github.com>2018-09-18 07:21:24 +0200
commit0a4d7ce669962e5a1fffdbe5d30c0ae90a7c4f3c (patch)
tree217218f51fcec4107c2b7c66387a69333c3445d0
parent8de87c7b1ca0aeff60c9a6cdacbcc7fba438dc2e (diff)
parent58559a22498bed8a53d2f85f8ae4e1add7bb9e5d (diff)
downloadrneovim-0a4d7ce669962e5a1fffdbe5d30c0ae90a7c4f3c.tar.gz
rneovim-0a4d7ce669962e5a1fffdbe5d30c0ae90a7c4f3c.tar.bz2
rneovim-0a4d7ce669962e5a1fffdbe5d30c0ae90a7c4f3c.zip
Merge pull request #9011 from janlazo/vim-8.0.1428
vim-patch:8.0.{1428,1443}
-rw-r--r--src/nvim/ex_getln.c2
-rw-r--r--src/nvim/undo.c5
2 files changed, 4 insertions, 3 deletions
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c
index 0bb704489b..92c35ad3a0 100644
--- a/src/nvim/ex_getln.c
+++ b/src/nvim/ex_getln.c
@@ -1787,7 +1787,7 @@ static int command_line_not_changed(CommandLineState *s)
/// as a trailing \|, which can happen while typing a pattern.
static int empty_pattern(char_u *p)
{
- int n = STRLEN(p);
+ size_t n = STRLEN(p);
// remove trailing \v and the like
while (n >= 2 && p[n - 2] == '\\'
diff --git a/src/nvim/undo.c b/src/nvim/undo.c
index e15b9ec796..2a86cc1fea 100644
--- a/src/nvim/undo.c
+++ b/src/nvim/undo.c
@@ -1901,7 +1901,8 @@ void undo_time(long step, bool sec, bool file, bool absolute)
// When "target" is 0; Back to origin.
if (target == 0) {
- goto found;
+ mark = lastmark; // avoid that GCC complains
+ goto target_zero;
}
/*
@@ -2020,7 +2021,7 @@ void undo_time(long step, bool sec, bool file, bool absolute)
}
}
-found:
+target_zero:
// If we found it: Follow the path to go to where we want to be.
if (uhp != NULL || target == 0) {
// First go up the tree as much as needed.