jkunstle / rpms / vim

Forked from rpms/vim 3 years ago
Clone

Blame SOURCES/7.4.482

073263
To: vim_dev@googlegroups.com
073263
Subject: Patch 7.4.482
073263
Fcc: outbox
073263
From: Bram Moolenaar <Bram@moolenaar.net>
073263
Mime-Version: 1.0
073263
Content-Type: text/plain; charset=UTF-8
073263
Content-Transfer-Encoding: 8bit
073263
------------
073263
073263
Patch 7.4.482
073263
Problem:    When 'balloonexpr' results in a list, the text has a trailing
073263
	    newline. (Lcd)
073263
Solution:   Remove one trailing newline.
073263
Files:	    src/gui_beval.c
073263
073263
073263
*** ../vim-7.4.481/src/gui_beval.c	2014-06-25 17:44:45.850768919 +0200
073263
--- src/gui_beval.c	2014-10-21 14:12:13.915158215 +0200
073263
***************
073263
*** 30,35 ****
073263
--- 30,36 ----
073263
      long	winnr = 0;
073263
      char_u	*bexpr;
073263
      buf_T	*save_curbuf;
073263
+     size_t	len;
073263
  # ifdef FEAT_WINDOWS
073263
      win_T	*cw;
073263
  # endif
073263
***************
073263
*** 83,88 ****
073263
--- 84,99 ----
073263
  	    vim_free(result);
073263
  	    result = eval_to_string(bexpr, NULL, TRUE);
073263
  
073263
+ 	    /* Remove one trailing newline, it is added when the result was a
073263
+ 	     * list and it's hardly every useful.  If the user really wants a
073263
+ 	     * trailing newline he can add two and one remains. */
073263
+ 	    if (result != NULL)
073263
+ 	    {
073263
+ 		len = STRLEN(result);
073263
+ 		if (len > 0 && result[len - 1] == NL)
073263
+ 		    result[len - 1] = NUL;
073263
+ 	    }
073263
+ 
073263
  	    if (use_sandbox)
073263
  		--sandbox;
073263
  	    --textlock;
073263
*** ../vim-7.4.481/src/version.c	2014-10-16 20:35:32.146264814 +0200
073263
--- src/version.c	2014-10-21 14:13:19.571158359 +0200
073263
***************
073263
*** 743,744 ****
073263
--- 743,746 ----
073263
  {   /* Add new patch number below this line */
073263
+ /**/
073263
+     482,
073263
  /**/
073263
073263
-- 
073263
You cannot propel yourself forward by patting yourself on the back.
073263
073263
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
073263
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
073263
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
073263
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///