Skip to content

Commit

Permalink
Merge pull request #560 from jixiuf/master
Browse files Browse the repository at this point in the history
add option vterm-set-bold-hightbright
  • Loading branch information
jixiuf authored Dec 9, 2021
2 parents 2681120 + c138252 commit ed6e867
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 3 additions & 1 deletion vterm-module.c
Original file line number Diff line number Diff line change
Expand Up @@ -1208,6 +1208,7 @@ emacs_value Fvterm_new(emacs_env *env, ptrdiff_t nargs, emacs_value args[],
int disable_underline = env->is_not_nil(env, args[4]);
int disable_inverse_video = env->is_not_nil(env, args[5]);
int ignore_blink_cursor = env->is_not_nil(env, args[6]);
int set_bold_hightbright = env->is_not_nil(env, args[7]);

term->vt = vterm_new(rows, cols);
vterm_set_utf8(term->vt, 1);
Expand All @@ -1216,6 +1217,7 @@ emacs_value Fvterm_new(emacs_env *env, ptrdiff_t nargs, emacs_value args[],

VTermState *state = vterm_obtain_state(term->vt);
vterm_state_set_unrecognised_fallbacks(state, &parser_callbacks, term);
vterm_state_set_bold_highbright(state, set_bold_hightbright);

vterm_screen_reset(term->vts, 1);
vterm_screen_set_callbacks(term->vts, &vterm_screen_callbacks, term);
Expand Down Expand Up @@ -1476,7 +1478,7 @@ int emacs_module_init(struct emacs_runtime *ert) {
// Exported functions
emacs_value fun;
fun =
env->make_function(env, 4, 7, Fvterm_new, "Allocate a new vterm.", NULL);
env->make_function(env, 4, 8, Fvterm_new, "Allocate a new vterm.", NULL);
bind_function(env, "vterm--new", fun);

fun = env->make_function(env, 1, 5, Fvterm_update,
Expand Down
8 changes: 7 additions & 1 deletion vterm.el
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,11 @@ This means that vterm will render bold with the default face weight."
:type 'boolean
:group 'vterm)

(defcustom vterm-set-bold-hightbright nil
"When not-nil, using hightbright colors for bolded text, see #549."
:type 'boolean
:group 'vterm)

(defcustom vterm-ignore-blink-cursor t
"When t,vterm will ignore request from application to turn on/off cursor blink.
Expand Down Expand Up @@ -687,7 +692,8 @@ Exceptions are defined by `vterm-keymap-exceptions'."
vterm-disable-bold-font
vterm-disable-underline
vterm-disable-inverse-video
vterm-ignore-blink-cursor))
vterm-ignore-blink-cursor
vterm-set-bold-hightbright))
(setq buffer-read-only t)
(setq-local scroll-conservatively 101)
(setq-local scroll-margin 0)
Expand Down

0 comments on commit ed6e867

Please sign in to comment.