diff options
| author | Yubao Liu <yubao.liu@gmail.com> | 2021-01-11 12:32:08 +0800 |
|---|---|---|
| committer | Yubao Liu <yubao.liu@gmail.com> | 2021-01-11 12:32:08 +0800 |
| commit | efc75ea3f3a7338fb5c87e70ce8c501fb0b3549a (patch) | |
| tree | f1b930d3910b1d1c84fa309b652b2cddda76d333 /elisp.c | |
| parent | b6592f94d76098d19f242c0d09f660f6a6461b76 (diff) | |
fix cursor type after hide cursor and show again
This patch also adds support for cursor blink.
VIM emits these ANSI escape sequences in insert mode:
\x1b[?25h show cursor
\x1b[?25l hide cursor
Diffstat (limited to 'elisp.c')
| -rw-r--r-- | elisp.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -26,6 +26,7 @@ emacs_value Qrear_nonsticky; emacs_value Qvterm_prompt; // Emacs functions +emacs_value Fblink_cursor_mode; emacs_value Fsymbol_value; emacs_value Flength; emacs_value Flist; @@ -172,8 +173,12 @@ emacs_value selected_window(emacs_env *env) { return env->funcall(env, Fselected_window, 0, (emacs_value[]){}); } -void set_cursor_type(emacs_env *env, emacs_value QCursorType) { - env->funcall(env, Fset, 2, (emacs_value[]){Qcursor_type, QCursorType}); +void set_cursor_type(emacs_env *env, emacs_value cursor_type) { + env->funcall(env, Fset, 2, (emacs_value[]){Qcursor_type, cursor_type}); +} + +void set_cursor_blink(emacs_env *env, bool blink) { + env->funcall(env, Fblink_cursor_mode, 1, (emacs_value[]){env->make_integer(env, blink)}); } emacs_value vterm_get_color(emacs_env *env, int index) { |
