aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/runtime.h
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-12-02 20:44:26 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-12-02 21:28:07 +0800
commit1aad5af637b0fc042e1155cc0955931e9ca75295 (patch)
treee90b6718e56fbfe4c5c9a614e40f9584a7632a0d /src/nvim/runtime.h
parenta3f01d32cba903b58e3ab5a353b4dba8c5431f9c (diff)
downloadrneovim-1aad5af637b0fc042e1155cc0955931e9ca75295.tar.gz
rneovim-1aad5af637b0fc042e1155cc0955931e9ca75295.tar.bz2
rneovim-1aad5af637b0fc042e1155cc0955931e9ca75295.zip
vim-patch:8.2.3829: no error when setting a func option to script-local function
Problem: No error when setting a func option to a script-local function. Solution: Give an error if the name starts with "s:". (closes vim/vim#9358) https://github.com/vim/vim/commit/94c785d235dccacf6cdf38c5903115b61ca8a981 Omit test: reverted in patch 8.2.3838. Cherry-pick SCRIPT_ID_VALID from patch 8.2.1539. Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'src/nvim/runtime.h')
-rw-r--r--src/nvim/runtime.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/nvim/runtime.h b/src/nvim/runtime.h
index d40bb6c1c1..de363020f8 100644
--- a/src/nvim/runtime.h
+++ b/src/nvim/runtime.h
@@ -79,6 +79,7 @@ typedef struct scriptitem_S {
/// Growarray to store info about already sourced scripts.
extern garray_T script_items;
#define SCRIPT_ITEM(id) (((scriptitem_T *)script_items.ga_data)[(id) - 1])
+#define SCRIPT_ID_VALID(id) ((id) > 0 && (id) <= script_items.ga_len)
typedef void (*DoInRuntimepathCB)(char *, void *);