API: nvim_source: save/restore script context #11159

Use a constant for the script id.
This commit is contained in:
Vikram Pal
2019-10-05 20:07:27 +05:30
committed by Justin M. Keyes
parent 6aa03e86da
commit 0a8d145075
3 changed files with 11 additions and 7 deletions

View File

@@ -74,12 +74,11 @@ void api_vim_free_all_mem(void)
}
void nvim_source(String command, Error *err)
FUNC_API_SINCE(5)
FUNC_API_SINCE(7)
{
try_start();
do_source_str((char_u *)command.data);
update_screen(VALID);
try_end(err);
try_start();
do_source_str((char_u *)command.data);
try_end(err);
}
/// Executes an ex-command.