Merge pull request #17921 from zeertzjq/vim-8.2.4649

vim-patch:8.2.{4349,4649}
This commit is contained in:
zeertzjq 2022-03-30 20:46:11 +08:00 committed by GitHub
commit 1217694f21
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 3 deletions

View File

@ -3893,7 +3893,7 @@ void ex_display(exarg_T *eap)
msg_puts_attr("^J", attr); msg_puts_attr("^J", attr);
n -= 2; 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); clen = utfc_ptr2len(p);
msg_outtrans_len(p, clen); msg_outtrans_len(p, clen);
p += clen - 1; p += clen - 1;

View File

@ -2780,6 +2780,7 @@ static int qf_jump_edit_buffer(qf_info_T *qi, qfline_T *qf_ptr, int forceit, int
// present. // present.
if (qfl_type == QFLT_LOCATION) { if (qfl_type == QFLT_LOCATION) {
win_T *wp = win_id2wp(prev_winid); win_T *wp = win_id2wp(prev_winid);
if (wp == NULL && curwin->w_llist != qi) { if (wp == NULL && curwin->w_llist != qi) {
emsg(_("E924: Current window was closed")); emsg(_("E924: Current window was closed"));
*opened_window = false; *opened_window = false;

View File

@ -6249,8 +6249,10 @@ static int nfa_regmatch(nfa_regprog_T *prog, nfa_state_T *start,
case NFA_MARK_GT: case NFA_MARK_GT:
case NFA_MARK_LT: case NFA_MARK_LT:
{ {
size_t col = rex.input - rex.line; pos_T *pos;
pos_T *pos = getmark_buf(rex.reg_buf, t->state->val, false); 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. // Line may have been freed, get it again.
if (REG_MULTI) { if (REG_MULTI) {

View File

@ -142,6 +142,7 @@ endfunc
func Test_FileChangedShell_edit_dialog() func Test_FileChangedShell_edit_dialog()
throw 'Skipped: requires a UI to be active' throw 'Skipped: requires a UI to be active'
CheckNotGui CheckNotGui
CheckUnix " Using low level feedkeys() does not work on MS-Windows.
new Xchanged_r new Xchanged_r
call setline(1, 'reload this') call setline(1, 'reload this')