Patch 8.0.1615
Problem: term_dumpload() does not use the right colors.
Solution: Initialize colors when not using create_vterm().
Files: src/terminal.c
*** ../vim-8.0.1614/src/terminal.c 2018-03-18 19:11:34.589942285 +0100
--- src/terminal.c 2018-03-18 19:13:28.909168026 +0100
***************
*** 3011,3035 ****
}
/*
! * Create a new vterm and initialize it.
*/
static void
! create_vterm(term_T *term, int rows, int cols)
{
- VTerm *vterm;
- VTermScreen *screen;
- VTermValue value;
VTermColor *fg, *bg;
int fgval, bgval;
int id;
- vterm = vterm_new(rows, cols);
- term->tl_vterm = vterm;
- screen = vterm_obtain_screen(vterm);
- vterm_screen_set_callbacks(screen, &screen_callbacks, term);
- /* TODO: depends on 'encoding'. */
- vterm_set_utf8(vterm, 1);
-
vim_memset(&term->tl_default_color.attrs, 0,
sizeof(VTermScreenCellAttrs));
term->tl_default_color.width = 1;
fg = &term->tl_default_color.fg;
--- 3011,3025 ----
}
/*
! * Initialize term->tl_default_color from the environment.
*/
static void
! init_default_colors(term_T *term)
{
VTermColor *fg, *bg;
int fgval, bgval;
int id;
vim_memset(&term->tl_default_color.attrs, 0,
sizeof(VTermScreenCellAttrs));
term->tl_default_color.width = 1;
fg = &term->tl_default_color.fg;
***************
*** 3152,3159 ****
term_get_bg_color(&bg->red, &bg->green, &bg->blue);
# endif
}
! vterm_state_set_default_colors(vterm_obtain_state(vterm), fg, bg);
/* Required to initialize most things. */
vterm_screen_reset(screen, 1 /* hard */);
--- 3142,3172 ----
term_get_bg_color(&bg->red, &bg->green, &bg->blue);
# endif
}
+ }
+
+ /*
+ * Create a new vterm and initialize it.
+ */
+ static void
+ create_vterm(term_T *term, int rows, int cols)
+ {
+ VTerm *vterm;
+ VTermScreen *screen;
+ VTermValue value;
+
+ vterm = vterm_new(rows, cols);
+ term->tl_vterm = vterm;
+ screen = vterm_obtain_screen(vterm);
+ vterm_screen_set_callbacks(screen, &screen_callbacks, term);
+ /* TODO: depends on 'encoding'. */
+ vterm_set_utf8(vterm, 1);
! init_default_colors(term);
!
! vterm_state_set_default_colors(
! vterm_obtain_state(vterm),
! &term->tl_default_color.fg,
! &term->tl_default_color.bg);
/* Required to initialize most things. */
vterm_screen_reset(screen, 1 /* hard */);
***************
*** 3767,3772 ****
--- 3780,3787 ----
VTermPos cursor_pos1;
VTermPos cursor_pos2;
+ init_default_colors(term);
+
rettv->vval.v_number = buf->b_fnum;
/* read the files, fill the buffer with the diff */
*** ../vim-8.0.1614/src/version.c 2018-03-18 19:14:01.196953266 +0100
--- src/version.c 2018-03-18 19:09:15.086922543 +0100
***************
*** 768,769 ****
--- 768,771 ----
{ /* Add new patch number below this line */
+ /**/
+ 1615,
/**/
--
How To Keep A Healthy Level Of Insanity:
16. Have your coworkers address you by your wrestling name, Rock Hard Kim.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.