:scr[iptnames] List all sourced script names, in the order they were
first sourced. The number is used for the script ID
|<SID>|.
+ For a script that was used with `import autoload` but
+ was not actually sourced yet an "A" is shown after the
+ script ID.
{not available when compiled without the |+eval|
feature}
}
for (i = 1; i <= script_items.ga_len && !got_int; ++i)
- if (SCRIPT_ITEM(i)->sn_name != NULL)
+ {
+ scriptitem_T *si = SCRIPT_ITEM(i);
+
+ if (si->sn_name != NULL)
{
- home_replace(NULL, SCRIPT_ITEM(i)->sn_name,
- NameBuff, MAXPATHL, TRUE);
- vim_snprintf((char *)IObuff, IOSIZE, "%3d: %s", i, NameBuff);
+ home_replace(NULL, si->sn_name, NameBuff, MAXPATHL, TRUE);
+ vim_snprintf((char *)IObuff, IOSIZE, "%3d%s: %s",
+ i,
+ si->sn_state == SN_STATE_NOT_LOADED ? " A" : "",
+ NameBuff);
msg_putchar('\n');
msg_outtrans(IObuff);
out_flush(); // output one line at a time
ui_breakcheck();
}
+ }
}
# if defined(BACKSLASH_IN_FILENAME) || defined(PROTO)
CheckScriptSuccess(lines)
assert_false(exists("g:toggle_loaded"))
assert_false(exists("g:toggle_called"))
+ assert_match('\d A: \f*[/\\]toggle.vim', execute('scriptnames'))
feedkeys("tt", 'xt')
assert_equal('yes', g:toggle_loaded)
assert_equal('yes', g:toggle_called)
+ assert_match('\d: \f*[/\\]toggle.vim', execute('scriptnames'))
feedkeys("xx", 'xt')
assert_equal('yes', g:doit_called)