@@ -722,6 +722,8 @@ static int term_settermprop(VTermProp prop, VTermValue *val, void *user_data) {
722722 Term * term = (Term * )user_data ;
723723 switch (prop ) {
724724 case VTERM_PROP_CURSORVISIBLE :
725+ if (term -> ignore_cursor_change )
726+ break ;
725727 invalidate_terminal (term , term -> cursor .row , term -> cursor .row + 1 );
726728 term -> cursor .cursor_visible = val -> boolean ;
727729 term -> cursor .cursor_type_changed = true;
@@ -734,6 +736,8 @@ static int term_settermprop(VTermProp prop, VTermValue *val, void *user_data) {
734736 term -> cursor .cursor_blink_changed = true;
735737 break ;
736738 case VTERM_PROP_CURSORSHAPE :
739+ if (term -> ignore_cursor_change )
740+ break ;
737741 invalidate_terminal (term , term -> cursor .row , term -> cursor .row + 1 );
738742 term -> cursor .cursor_type = val -> number ;
739743 term -> cursor .cursor_type_changed = true;
@@ -1231,6 +1235,7 @@ emacs_value Fvterm_new(emacs_env *env, ptrdiff_t nargs, emacs_value args[],
12311235 int disable_inverse_video = env -> is_not_nil (env , args [5 ]);
12321236 int ignore_blink_cursor = env -> is_not_nil (env , args [6 ]);
12331237 int set_bold_hightbright = env -> is_not_nil (env , args [7 ]);
1238+ int ignore_cursor_change = env -> is_not_nil (env , args [8 ]);
12341239
12351240 term -> vt = vterm_new (rows , cols );
12361241 vterm_set_utf8 (term -> vt , 1 );
@@ -1266,6 +1271,7 @@ emacs_value Fvterm_new(emacs_env *env, ptrdiff_t nargs, emacs_value args[],
12661271 term -> disable_underline = disable_underline ;
12671272 term -> disable_inverse_video = disable_inverse_video ;
12681273 term -> ignore_blink_cursor = ignore_blink_cursor ;
1274+ term -> ignore_cursor_change = ignore_cursor_change ;
12691275 emacs_value newline = env -> make_string (env , "\n" , 1 );
12701276 for (int i = 0 ; i < term -> height ; i ++ ) {
12711277 insert (env , newline );
@@ -1511,7 +1517,7 @@ int emacs_module_init(struct emacs_runtime *ert) {
15111517 // Exported functions
15121518 emacs_value fun ;
15131519 fun =
1514- env -> make_function (env , 4 , 8 , Fvterm_new , "Allocate a new vterm." , NULL );
1520+ env -> make_function (env , 4 , 9 , Fvterm_new , "Allocate a new vterm." , NULL );
15151521 bind_function (env , "vterm--new" , fun );
15161522
15171523 fun = env -> make_function (env , 1 , 5 , Fvterm_update ,
0 commit comments