aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjixiuf <jixiuf@qq.com>2019-07-26 23:08:15 +0800
committerjixiuf <jixiuf@qq.com>2019-07-26 23:08:15 +0800
commitfb29e140ae41661137a57fae1d934b1b5b6bcf5e (patch)
tree81d24c9b0ab18434b1ff9be6681bd6fbd304ab3d
parentc209a86e869bb3e91ad94541dbcfd3039ef1d2eb (diff)
Revert "trying support blink-cursor-mode"
This reverts commit 74b8e5cb2d1c6798c42e56ae444e5e96c629f2c5.
-rw-r--r--elisp.c5
-rw-r--r--elisp.h2
-rw-r--r--vterm-module.c12
-rw-r--r--vterm-module.h2
4 files changed, 0 insertions, 21 deletions
diff --git a/elisp.c b/elisp.c
index 5cb5bdf..3fe511f 100644
--- a/elisp.c
+++ b/elisp.c
@@ -108,11 +108,6 @@ void set_cursor_type(emacs_env *env, emacs_value QCursorType) {
env->funcall(env, Fset, 2, (emacs_value[]){Qcursor_type, QCursorType});
}
-void toggle_cursor_blinking(emacs_env *env, bool blinking) {
- emacs_value Qfalse = env->make_integer(env, -1);
- emacs_value Qblinking = blinking ? Qt : Qfalse;
- env->funcall(env, Fblink_cursor_mode, 1, (emacs_value[]){Qblinking});
-}
emacs_value get_hex_color_fg(emacs_env *env, emacs_value face) {
return env->funcall(env, Fvterm_face_color_hex, 2,
diff --git a/elisp.h b/elisp.h
index 774b681..584a1d8 100644
--- a/elisp.h
+++ b/elisp.h
@@ -44,7 +44,6 @@ emacs_value Fput_text_property;
emacs_value Fset;
emacs_value Fvterm_face_color_hex;
emacs_value Fvterm_flush_output;
-emacs_value Fblink_cursor_mode;
emacs_value Fget_buffer_window;
emacs_value Fselected_window;
emacs_value Fvterm_set_title;
@@ -66,7 +65,6 @@ void goto_char(emacs_env *env, int pos);
void forward_line(emacs_env *env, int n);
void goto_line(emacs_env *env, int n);
void set_cursor_type(emacs_env *env, emacs_value cursor_type);
-void toggle_cursor_blinking(emacs_env *env, bool visible);
void delete_lines(emacs_env *env, int linenum, int count, bool del_whole_line);
emacs_value get_hex_color_fg(emacs_env *env, emacs_value face);
emacs_value get_hex_color_bg(emacs_env *env, emacs_value face);
diff --git a/vterm-module.c b/vterm-module.c
index 46fc2e8..224ffcf 100644
--- a/vterm-module.c
+++ b/vterm-module.c
@@ -375,11 +375,6 @@ static void term_redraw_cursor(Term *term, emacs_env *env) {
static void term_redraw(Term *term, emacs_env *env) {
term_redraw_cursor(term, env);
if (term->is_invalidated) {
- if (term->cursor.blinking_changed) {
- toggle_cursor_blinking(env, term->cursor.blinking);
- term->cursor.blinking_changed = false;
- }
-
long bufline_before = env->extract_integer(env, buffer_line_number(env));
refresh_scrollback(term, env);
refresh_screen(term, env);
@@ -453,10 +448,6 @@ static int term_settermprop(VTermProp prop, VTermValue *val, void *user_data) {
case VTERM_PROP_TITLE:
term_set_title(term, val->string);
break;
- case VTERM_PROP_CURSORBLINK:
- term->cursor.blinking = val->boolean;
- term->cursor.blinking_changed = true;
- break;
case VTERM_PROP_ALTSCREEN:
invalidate_terminal(term, 0, term->height);
break;
@@ -650,7 +641,6 @@ static emacs_value Fvterm_new(emacs_env *env, ptrdiff_t nargs,
term->width = cols;
term->height = rows;
- term->cursor.blinking = env->is_not_nil(env, Fblink_cursor_mode);
term->title = NULL;
term->is_title_changed = false;
@@ -771,8 +761,6 @@ int emacs_module_init(struct emacs_runtime *ert) {
env->make_global_ref(env, env->intern(env, "set-window-point"));
Fpoint = env->make_global_ref(env, env->intern(env, "point"));
Fforward_char = env->make_global_ref(env, env->intern(env, "forward-char"));
- Fblink_cursor_mode =
- env->make_global_ref(env, env->intern(env, "blink-cursor-mode"));
Fget_buffer_window =
env->make_global_ref(env, env->intern(env, "get-buffer-window"));
Fselected_window =
diff --git a/vterm-module.h b/vterm-module.h
index e9378d2..9ed1831 100644
--- a/vterm-module.h
+++ b/vterm-module.h
@@ -33,8 +33,6 @@ enum {
typedef struct Cursor {
int row, col;
- bool blinking;
- bool blinking_changed;
int cursor_type;
bool cursor_type_changed;
} Cursor;