aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-03-30 20:46:11 +0800
committerGitHub <noreply@github.com>2022-03-30 20:46:11 +0800
commit1217694f21cff2953e6c56be2157365daf7078eb (patch)
tree0a2e9229bbb54fc6b16d4a9bc1cd8f6b2a2ab982 /src
parentac1dd046c01e0685b0f8eeaa36e622b3c2f339ad (diff)
parent06cf205aced6b0d5b7ae919665f2ab3fd81ab960 (diff)
downloadrneovim-1217694f21cff2953e6c56be2157365daf7078eb.tar.gz
rneovim-1217694f21cff2953e6c56be2157365daf7078eb.tar.bz2
rneovim-1217694f21cff2953e6c56be2157365daf7078eb.zip
Merge pull request #17921 from zeertzjq/vim-8.2.4649
vim-patch:8.2.{4349,4649}
Diffstat (limited to 'src')
-rw-r--r--src/nvim/ops.c2
-rw-r--r--src/nvim/quickfix.c1
-rw-r--r--src/nvim/regexp_nfa.c6
-rw-r--r--src/nvim/testdir/test_filechanged.vim1
4 files changed, 7 insertions, 3 deletions
diff --git a/src/nvim/ops.c b/src/nvim/ops.c
index 4404ee7b80..dab6d237bf 100644
--- a/src/nvim/ops.c
+++ b/src/nvim/ops.c
@@ -3893,7 +3893,7 @@ void ex_display(exarg_T *eap)
msg_puts_attr("^J", attr);
n -= 2;
}
- for (p = yb->y_array[j]; *p && (n -= ptr2cells(p)) >= 0; p++) { // -V1019
+ for (p = yb->y_array[j]; *p != NUL && (n -= ptr2cells(p)) >= 0; p++) { // -V1019
clen = utfc_ptr2len(p);
msg_outtrans_len(p, clen);
p += clen - 1;
diff --git a/src/nvim/quickfix.c b/src/nvim/quickfix.c
index 9ee7b1cc8a..c8d9e91fb5 100644
--- a/src/nvim/quickfix.c
+++ b/src/nvim/quickfix.c
@@ -2780,6 +2780,7 @@ static int qf_jump_edit_buffer(qf_info_T *qi, qfline_T *qf_ptr, int forceit, int
// present.
if (qfl_type == QFLT_LOCATION) {
win_T *wp = win_id2wp(prev_winid);
+
if (wp == NULL && curwin->w_llist != qi) {
emsg(_("E924: Current window was closed"));
*opened_window = false;
diff --git a/src/nvim/regexp_nfa.c b/src/nvim/regexp_nfa.c
index 8a14a2864c..a8d6e9c40b 100644
--- a/src/nvim/regexp_nfa.c
+++ b/src/nvim/regexp_nfa.c
@@ -6249,8 +6249,10 @@ static int nfa_regmatch(nfa_regprog_T *prog, nfa_state_T *start,
case NFA_MARK_GT:
case NFA_MARK_LT:
{
- size_t col = rex.input - rex.line;
- pos_T *pos = getmark_buf(rex.reg_buf, t->state->val, false);
+ pos_T *pos;
+ size_t col = REG_MULTI ? rex.input - rex.line : 0;
+
+ pos = getmark_buf(rex.reg_buf, t->state->val, false);
// Line may have been freed, get it again.
if (REG_MULTI) {
diff --git a/src/nvim/testdir/test_filechanged.vim b/src/nvim/testdir/test_filechanged.vim
index 06ccd6e85f..8e1cb2c3ee 100644
--- a/src/nvim/testdir/test_filechanged.vim
+++ b/src/nvim/testdir/test_filechanged.vim
@@ -142,6 +142,7 @@ endfunc
func Test_FileChangedShell_edit_dialog()
throw 'Skipped: requires a UI to be active'
CheckNotGui
+ CheckUnix " Using low level feedkeys() does not work on MS-Windows.
new Xchanged_r
call setline(1, 'reload this')