mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
updated for version 7.4.482
Problem: When 'balloonexpr' results in a list, the text has a trailing newline. (Lcd) Solution: Remove one trailing newline.
This commit is contained in:
@@ -30,6 +30,7 @@ general_beval_cb(beval, state)
|
|||||||
long winnr = 0;
|
long winnr = 0;
|
||||||
char_u *bexpr;
|
char_u *bexpr;
|
||||||
buf_T *save_curbuf;
|
buf_T *save_curbuf;
|
||||||
|
size_t len;
|
||||||
# ifdef FEAT_WINDOWS
|
# ifdef FEAT_WINDOWS
|
||||||
win_T *cw;
|
win_T *cw;
|
||||||
# endif
|
# endif
|
||||||
@@ -83,6 +84,16 @@ general_beval_cb(beval, state)
|
|||||||
vim_free(result);
|
vim_free(result);
|
||||||
result = eval_to_string(bexpr, NULL, TRUE);
|
result = eval_to_string(bexpr, NULL, TRUE);
|
||||||
|
|
||||||
|
/* Remove one trailing newline, it is added when the result was a
|
||||||
|
* list and it's hardly every useful. If the user really wants a
|
||||||
|
* trailing newline he can add two and one remains. */
|
||||||
|
if (result != NULL)
|
||||||
|
{
|
||||||
|
len = STRLEN(result);
|
||||||
|
if (len > 0 && result[len - 1] == NL)
|
||||||
|
result[len - 1] = NUL;
|
||||||
|
}
|
||||||
|
|
||||||
if (use_sandbox)
|
if (use_sandbox)
|
||||||
--sandbox;
|
--sandbox;
|
||||||
--textlock;
|
--textlock;
|
||||||
|
@@ -741,6 +741,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
482,
|
||||||
/**/
|
/**/
|
||||||
481,
|
481,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user