comparison src/change.c @ 20229:06a1dd50463e v8.2.0670

patch 8.2.0670: cannot change window when evaluating 'completefunc' Commit: https://github.com/vim/vim/commit/6adb9ea0a6ca01414f4b591f379b0f829a8273c0 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Apr 30 22:31:18 2020 +0200 patch 8.2.0670: cannot change window when evaluating 'completefunc' Problem: Cannot change window when evaluating 'completefunc'. Solution: Make a difference between not changing text or buffers and also not changing window.
author Bram Moolenaar <Bram@vim.org>
date Thu, 30 Apr 2020 22:45:04 +0200
parents 435726a03481
children d571231175b4
comparison
equal deleted inserted replaced
20228:4fb1da5a5031 20229:06a1dd50463e
380 argv[3].v_type = VAR_NUMBER; 380 argv[3].v_type = VAR_NUMBER;
381 argv[3].vval.v_number = added; 381 argv[3].vval.v_number = added;
382 382
383 argv[4].v_type = VAR_LIST; 383 argv[4].v_type = VAR_LIST;
384 argv[4].vval.v_list = buf->b_recorded_changes; 384 argv[4].vval.v_list = buf->b_recorded_changes;
385 ++textlock; 385 ++textwinlock;
386 386
387 for (lnr = buf->b_listener; lnr != NULL; lnr = lnr->lr_next) 387 for (lnr = buf->b_listener; lnr != NULL; lnr = lnr->lr_next)
388 { 388 {
389 call_callback(&lnr->lr_callback, -1, &rettv, 5, argv); 389 call_callback(&lnr->lr_callback, -1, &rettv, 5, argv);
390 clear_tv(&rettv); 390 clear_tv(&rettv);
391 } 391 }
392 392
393 --textlock; 393 --textwinlock;
394 list_unref(buf->b_recorded_changes); 394 list_unref(buf->b_recorded_changes);
395 buf->b_recorded_changes = NULL; 395 buf->b_recorded_changes = NULL;
396 396
397 if (save_updating_screen) 397 if (save_updating_screen)
398 updating_screen = TRUE; 398 updating_screen = TRUE;