mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 8.2.1106: crash when trying to use s: variable in typed command
Problem: Crash when trying to use s: variable in typed command. Solution: Don't use the script index when not set. (Ken Takata, closes #6366)
This commit is contained in:
@@ -2339,6 +2339,9 @@ find_imported(char_u *name, size_t len, cctx_T *cctx)
|
||||
scriptitem_T *si = SCRIPT_ITEM(current_sctx.sc_sid);
|
||||
int idx;
|
||||
|
||||
if (current_sctx.sc_sid <= 0)
|
||||
return NULL;
|
||||
si = SCRIPT_ITEM(current_sctx.sc_sid);
|
||||
if (cctx != NULL)
|
||||
for (idx = 0; idx < cctx->ctx_imports.ga_len; ++idx)
|
||||
{
|
||||
|
Reference in New Issue
Block a user