@@ -725,6 +725,8 @@ static int term_settermprop(VTermProp prop, VTermValue *val, void *user_data) {
725725 Term * term = (Term * )user_data ;
726726 switch (prop ) {
727727 case VTERM_PROP_CURSORVISIBLE :
728+ if (term -> ignore_cursor_change )
729+ break ;
728730 invalidate_terminal (term , term -> cursor .row , term -> cursor .row + 1 );
729731 term -> cursor .cursor_visible = val -> boolean ;
730732 term -> cursor .cursor_type_changed = true;
@@ -737,6 +739,8 @@ static int term_settermprop(VTermProp prop, VTermValue *val, void *user_data) {
737739 term -> cursor .cursor_blink_changed = true;
738740 break ;
739741 case VTERM_PROP_CURSORSHAPE :
742+ if (term -> ignore_cursor_change )
743+ break ;
740744 invalidate_terminal (term , term -> cursor .row , term -> cursor .row + 1 );
741745 term -> cursor .cursor_type = val -> number ;
742746 term -> cursor .cursor_type_changed = true;
@@ -1234,6 +1238,7 @@ emacs_value Fvterm_new(emacs_env *env, ptrdiff_t nargs, emacs_value args[],
12341238 int disable_inverse_video = env -> is_not_nil (env , args [5 ]);
12351239 int ignore_blink_cursor = env -> is_not_nil (env , args [6 ]);
12361240 int set_bold_highbright = env -> is_not_nil (env , args [7 ]);
1241+ int ignore_cursor_change = env -> is_not_nil (env , args [8 ]);
12371242
12381243 term -> vt = vterm_new (rows , cols );
12391244 vterm_set_utf8 (term -> vt , 1 );
@@ -1269,6 +1274,7 @@ emacs_value Fvterm_new(emacs_env *env, ptrdiff_t nargs, emacs_value args[],
12691274 term -> disable_underline = disable_underline ;
12701275 term -> disable_inverse_video = disable_inverse_video ;
12711276 term -> ignore_blink_cursor = ignore_blink_cursor ;
1277+ term -> ignore_cursor_change = ignore_cursor_change ;
12721278 emacs_value newline = env -> make_string (env , "\n" , 1 );
12731279 for (int i = 0 ; i < term -> height ; i ++ ) {
12741280 insert (env , newline );
@@ -1514,7 +1520,7 @@ int emacs_module_init(struct emacs_runtime *ert) {
15141520 // Exported functions
15151521 emacs_value fun ;
15161522 fun =
1517- env -> make_function (env , 4 , 8 , Fvterm_new , "Allocate a new vterm." , NULL );
1523+ env -> make_function (env , 4 , 9 , Fvterm_new , "Allocate a new vterm." , NULL );
15181524 bind_function (env , "vterm--new" , fun );
15191525
15201526 fun = env -> make_function (env , 1 , 5 , Fvterm_update ,
0 commit comments