patch 9.1.1326: invalid cursor position after 'tagfunc'

Problem:  invalid cursor position after 'tagfunc'
          (gandalf4a)
Solution: call check_cursor() after executing the 'tagfunc'

Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Christian Brabandt
2025-04-20 18:21:35 +02:00
parent 7938c40b34
commit 9919085491
3 changed files with 22 additions and 0 deletions

View File

@ -1481,6 +1481,7 @@ find_tagfunc_tags(
save_pos = curwin->w_cursor;
result = call_callback(&curbuf->b_tfu_cb, 0, &rettv, 3, args);
curwin->w_cursor = save_pos; // restore the cursor position
check_cursor(); // make sure cursor position is valid
--d->dv_refcount;
if (result == FAIL)