aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2017-03-15 14:10:56 +0100
committerJustin M. Keyes <justinkz@gmail.com>2017-03-15 14:10:56 +0100
commitec4e84210b87965e7110b061a321c7ec8a359d47 (patch)
treed6b880ee8fa788dab05e83d300bcfe8279fb163a /src
parent3b52e3c4c8784d60e44f3dc9a6bb7795af588931 (diff)
parent2ecab2193d6ea866be77588a80ce14669a008a7b (diff)
downloadrneovim-ec4e84210b87965e7110b061a321c7ec8a359d47.tar.gz
rneovim-ec4e84210b87965e7110b061a321c7ec8a359d47.tar.bz2
rneovim-ec4e84210b87965e7110b061a321c7ec8a359d47.zip
Merge #6254 'vim-patch:7.4.2135,7.4.2144,7.4.2151'
Diffstat (limited to 'src')
-rw-r--r--src/nvim/diff.c2
-rw-r--r--src/nvim/quickfix.c27
-rw-r--r--src/nvim/testdir/test_quickfix.vim1
-rw-r--r--src/nvim/version.c6
4 files changed, 13 insertions, 23 deletions
diff --git a/src/nvim/diff.c b/src/nvim/diff.c
index 5940dc55da..11ade20c1c 100644
--- a/src/nvim/diff.c
+++ b/src/nvim/diff.c
@@ -129,7 +129,7 @@ void diff_buf_add(buf_T *buf)
}
}
- EMSGN(_("E96: Can not diff more than %" PRId64 " buffers"), DB_COUNT);
+ EMSGN(_("E96: Cannot diff more than %" PRId64 " buffers"), DB_COUNT);
}
/// Find buffer "buf" in the list of diff buffers for the current tab page.
diff --git a/src/nvim/quickfix.c b/src/nvim/quickfix.c
index 7f5e5a481b..3f7975051f 100644
--- a/src/nvim/quickfix.c
+++ b/src/nvim/quickfix.c
@@ -564,11 +564,8 @@ static int qf_get_next_file_line(qfstate_T *state)
bool discard = false;
state->linelen = STRLEN(IObuff);
- if (state->linelen == IOSIZE - 1 && !(IObuff[state->linelen - 1] == '\n'
-#ifdef USE_CRNL
- || IObuff[state->linelen - 1] == '\r'
-#endif
- )) { // NOLINT(whitespace/parens)
+ if (state->linelen == IOSIZE - 1
+ && !(IObuff[state->linelen - 1] == '\n')) {
// The current line exceeds IObuff, continue reading using growbuf
// until EOL or LINE_MAXLEN bytes is read.
if (state->growbuf == NULL) {
@@ -587,11 +584,7 @@ static int qf_get_next_file_line(qfstate_T *state)
}
state->linelen = STRLEN(state->growbuf + growbuflen);
growbuflen += state->linelen;
- if (state->growbuf[growbuflen - 1] == '\n'
-#ifdef USE_CRNL
- || state->growbuf[growbuflen - 1] == '\r'
-#endif
- ) {
+ if (state->growbuf[growbuflen - 1] == '\n') {
break;
}
if (state->growbufsiz == LINE_MAXLEN) {
@@ -609,11 +602,7 @@ static int qf_get_next_file_line(qfstate_T *state)
// discard everything until EOL or EOF is reached.
if (fgets((char *)IObuff, IOSIZE, state->fd) == NULL
|| STRLEN(IObuff) < IOSIZE - 1
- || IObuff[IOSIZE - 1] == '\n'
-#ifdef USE_CRNL
- || IObuff[IOSIZE - 1] == '\r'
-#endif
- ) {
+ || IObuff[IOSIZE - 1] == '\n') {
break;
}
}
@@ -655,12 +644,12 @@ static int qf_get_nextline(qfstate_T *state)
if (state->linelen > 0 && state->linebuf[state->linelen - 1] == '\n') {
state->linebuf[state->linelen - 1] = NUL;
- }
#ifdef USE_CRNL
- if (state->linelen > 0 && state->linebuf[state->linelen - 1] == '\r') {
- state->linebuf[state->linelen - 1] = NUL;
- }
+ if (state->linelen > 1 && state->linebuf[state->linelen - 2] == '\r') {
+ state->linebuf[state->linelen - 2] = NUL;
+ }
#endif
+ }
remove_bom(state->linebuf);
diff --git a/src/nvim/testdir/test_quickfix.vim b/src/nvim/testdir/test_quickfix.vim
index 1f4a39b853..640918b343 100644
--- a/src/nvim/testdir/test_quickfix.vim
+++ b/src/nvim/testdir/test_quickfix.vim
@@ -389,6 +389,7 @@ endfunction
function Test_helpgrep()
call s:test_xhelpgrep('c')
+ helpclose
call s:test_xhelpgrep('l')
endfunc
diff --git a/src/nvim/version.c b/src/nvim/version.c
index 13b8247044..614de67e04 100644
--- a/src/nvim/version.c
+++ b/src/nvim/version.c
@@ -289,14 +289,14 @@ static int included_patches[] = {
// 2154 NA
// 2153 NA
// 2152,
- // 2151,
+ 2151,
// 2150 NA
2149,
2148,
2147,
2146,
// 2145 NA
- // 2144,
+ 2144,
2143,
2142,
2141,
@@ -305,7 +305,7 @@ static int included_patches[] = {
// 2138 NA
2137,
2136,
- // 2135,
+ 2135,
2134,
// 2133 NA
// 2132 NA