Mercurial > vim
view src/proto/vim9class.pro @ 34194:a522c6c0127b v9.1.0047
patch 9.1.0047: issues with temp curwin/buf while cmdwin is open
Commit: https://github.com/vim/vim/commit/988f74311c26ea9917e84fbae608de226dba7e5f
Author: Sean Dewar <seandewar@users.noreply.github.com>
Date: Wed Aug 16 14:17:36 2023 +0100
patch 9.1.0047: issues with temp curwin/buf while cmdwin is open
Problem: Things that temporarily change/restore curwin/buf (e.g:
win_execute, some autocmds) may break assumptions that
curwin/buf is the cmdwin when "cmdwin_type != 0", causing
issues.
Solution: Expose the cmdwin's real win/buf and check that instead. Also
try to ensure these variables are NULL if "cmdwin_type == 0",
allowing them to be used directly in most cases without
checking cmdwin_type. (Sean Dewar)
Alternatively, we could ban win_execute in the cmdwin and audit all places that
temporarily change/restore curwin/buf, but I didn't notice any problems arising
from allowing this (standard cmdwin restrictions still apply, so things that may
actually break the cmdwin are still forbidden).
closes: #12819
Signed-off-by: Sean Dewar <seandewar@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 23 Jan 2024 23:00:04 +0100 |
parents | 0f2632b04cde |
children | 5c1a025192ed |
line wrap: on
line source
/* vim9class.c */ int object_index_from_itf_index(class_T *itf, int is_method, int idx, class_T *cl); void ex_class(exarg_T *eap); type_T *oc_member_type(class_T *cl, int is_object, char_u *name, char_u *name_end, int *member_idx); type_T *oc_member_type_by_idx(class_T *cl, int is_object, int member_idx); void ex_enum(exarg_T *eap); void typealias_free(typealias_T *ta); void typealias_unref(typealias_T *ta); void ex_type(exarg_T *eap); int class_object_index(char_u **arg, typval_T *rettv, evalarg_T *evalarg, int verbose); ufunc_T *find_class_func(char_u **arg); int class_member_idx(class_T *cl, char_u *name, size_t namelen); ocmember_T *class_member_lookup(class_T *cl, char_u *name, size_t namelen, int *idx); int class_method_idx(class_T *cl, char_u *name, size_t namelen); ocmember_T *object_member_lookup(class_T *cl, char_u *name, size_t namelen, int *idx); int object_method_idx(class_T *cl, char_u *name, size_t namelen); ocmember_T *member_lookup(class_T *cl, vartype_T v_type, char_u *name, size_t namelen, int *idx); ufunc_T *method_lookup(class_T *cl, vartype_T v_type, char_u *name, size_t namelen, int *idx); int inside_class(cctx_T *cctx_arg, class_T *cl); int oc_var_check_ro(class_T *cl, ocmember_T *m); void obj_lock_const_vars(object_T *obj); void copy_object(typval_T *from, typval_T *to); void copy_class(typval_T *from, typval_T *to); void class_unref(class_T *cl); int class_free_nonref(int copyID); int set_ref_in_classes(int copyID); void object_created(object_T *obj); void object_unref(object_T *obj); int object_free_nonref(int copyID); void object_free_items(int copyID); void emsg_var_cl_define(char *msg, char_u *name, size_t len, class_T *cl); void method_not_found_msg(class_T *cl, vartype_T v_type, char_u *name, size_t len); void member_not_found_msg(class_T *cl, vartype_T v_type, char_u *name, size_t len); void defcompile_class(class_T *cl); void defcompile_classes_in_script(void); int is_class_name(char_u *name, typval_T *rettv); int class_instance_of(class_T *cl, class_T *other_cl); void f_instanceof(typval_T *argvars, typval_T *rettv); /* vim: set ft=c : */