Mercurial > vim
comparison src/libvterm/src/pen.c @ 32728:b13f723a7ec6 v9.0.1684
patch 9.0.1684: Update libvterm to rev 839
Commit: https://github.com/vim/vim/commit/b00df7aa388994119346a21d77b0d0db2a0a5e9f
Author: zeertzjq <zeertzjq@outlook.com>
Date: Tue Aug 8 11:03:00 2023 +0800
patch 9.0.1684: Update libvterm to rev 839
Problem: libvterm slightly outdated
Solution: Update libvterm from rev 818 to rev 839
Notable fix: libvterm now handles DECSM/DECRM with multiple arguents,
so several ncurses programs (e.g. nnn) can enable mouse properly when
run in Vim's terminal in XTerm.
closes: #12746
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Fri, 11 Aug 2023 21:30:03 +0200 |
parents | bf4f25d50fdd |
children |
comparison
equal
deleted
inserted
replaced
32727:6beeb2e0105d | 32728:b13f723a7ec6 |
---|---|
257 lookup_colour_palette(state, index, col); | 257 lookup_colour_palette(state, index, col); |
258 } | 258 } |
259 | 259 |
260 void vterm_state_set_default_colors(VTermState *state, const VTermColor *default_fg, const VTermColor *default_bg) | 260 void vterm_state_set_default_colors(VTermState *state, const VTermColor *default_fg, const VTermColor *default_bg) |
261 { | 261 { |
262 /* Copy the given colors */ | 262 if(default_fg) { |
263 state->default_fg = *default_fg; | 263 state->default_fg = *default_fg; |
264 state->default_bg = *default_bg; | 264 state->default_fg.type = (state->default_fg.type & ~VTERM_COLOR_DEFAULT_MASK) |
265 | 265 | VTERM_COLOR_DEFAULT_FG; |
266 /* Make sure the correct type flags are set */ | 266 } |
267 state->default_fg.type = (state->default_fg.type & ~VTERM_COLOR_DEFAULT_MASK) | 267 |
268 | VTERM_COLOR_DEFAULT_FG; | 268 if(default_bg) { |
269 state->default_bg.type = (state->default_bg.type & ~VTERM_COLOR_DEFAULT_MASK) | 269 state->default_bg = *default_bg; |
270 | VTERM_COLOR_DEFAULT_BG; | 270 state->default_bg.type = (state->default_bg.type & ~VTERM_COLOR_DEFAULT_MASK) |
271 | VTERM_COLOR_DEFAULT_BG; | |
272 } | |
271 } | 273 } |
272 | 274 |
273 void vterm_state_set_palette_color(VTermState *state, int index, const VTermColor *col) | 275 void vterm_state_set_palette_color(VTermState *state, int index, const VTermColor *col) |
274 { | 276 { |
275 if(index >= 0 && index < 16) | 277 if(index >= 0 && index < 16) |