Patch 8.1.2209
Problem: LF in escape codes may be expanded to CR-LF.
Solution: Do not expand LF in escape codes to CR-LF. (closes #5107)
Files: src/term.c
*** ../vim-8.1.2208/src/term.c 2019-10-20 19:53:19.042101570 +0200
--- src/term.c 2019-10-24 17:48:03.772971292 +0200
***************
*** 2544,2562 ****
out_flush();
}
- static void out_char_nf(unsigned);
-
/*
! * out_char_nf(c): like out_char(), but don't flush when p_wd is set
*/
static void
out_char_nf(unsigned c)
{
- #if defined(UNIX) || defined(VMS) || defined(AMIGA) || defined(MACOS_X)
- if (c == '\n') /* turn LF into CR-LF (CRMOD doesn't seem to do this) */
- out_char_nf('\r');
- #endif
-
out_buf[out_pos++] = c;
if (out_pos >= OUT_SIZE)
--- 2544,2555 ----
out_flush();
}
/*
! * Output "c" like out_char(), but don't flush when p_wd is set.
*/
static void
out_char_nf(unsigned c)
{
out_buf[out_pos++] = c;
if (out_pos >= OUT_SIZE)
***************
*** 2564,2572 ****
}
/*
! * A never-padding out_str.
! * use this whenever you don't want to run the string through tputs.
! * tputs above is harmless, but tputs from the termcap library
* is likely to strip off leading digits, that it mistakes for padding
* information, and "%i", "%d", etc.
* This should only be used for writing terminal codes, not for outputting
--- 2557,2565 ----
}
/*
! * A never-padding out_str().
! * Use this whenever you don't want to run the string through tputs().
! * tputs() above is harmless, but tputs() from the termcap library
* is likely to strip off leading digits, that it mistakes for padding
* information, and "%i", "%d", etc.
* This should only be used for writing terminal codes, not for outputting
***************
*** 2660,2666 ****
/*
* out_str(s): Put a character string a byte at a time into the output buffer.
! * If HAVE_TGETENT is defined use the termcap parser. (jw)
* This should only be used for writing terminal codes, not for outputting
* normal text (use functions like msg_puts() and screen_putchar() for that).
*/
--- 2653,2659 ----
/*
* out_str(s): Put a character string a byte at a time into the output buffer.
! * If HAVE_TGETENT is defined use tputs(), the termcap parser. (jw)
* This should only be used for writing terminal codes, not for outputting
* normal text (use functions like msg_puts() and screen_putchar() for that).
*/
***************
*** 2943,2952 ****
void
term_settitle(char_u *title)
{
! /* t_ts takes one argument: column in status line */
! OUT_STR(tgoto((char *)T_TS, 0, 0)); /* set title start */
out_str_nf(title);
! out_str(T_FS); /* set title end */
out_flush();
}
--- 2936,2945 ----
void
term_settitle(char_u *title)
{
! // t_ts takes one argument: column in status line
! OUT_STR(tgoto((char *)T_TS, 0, 0)); // set title start
out_str_nf(title);
! out_str(T_FS); // set title end
out_flush();
}
***************
*** 3786,3794 ****
{
if (*T_CSC != NUL)
{
! out_str(T_CSC); /* set cursor color start */
out_str_nf(color);
! out_str(T_CEC); /* set cursor color end */
out_flush();
}
}
--- 3779,3787 ----
{
if (*T_CSC != NUL)
{
! out_str(T_CSC); // set cursor color start
out_str_nf(color);
! out_str(T_CEC); // set cursor color end
out_flush();
}
}
*** ../vim-8.1.2208/src/version.c 2019-10-24 17:43:21.617892922 +0200
--- src/version.c 2019-10-24 17:44:50.201612467 +0200
***************
*** 743,744 ****
--- 743,746 ----
{ /* Add new patch number below this line */
+ /**/
+ 2209,
/**/
--
If you had to identify, in one word, the reason why the
human race has not achieved, and never will achieve, its
full potential, that word would be "meetings."
/// 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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/201910241549.x9OFn9ib027299%40masaka.moolenaar.net.