Karsten Hopp d8bb87
To: vim_dev@googlegroups.com
Karsten Hopp d8bb87
Subject: Patch 7.3.695
Karsten Hopp d8bb87
Fcc: outbox
Karsten Hopp d8bb87
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp d8bb87
Mime-Version: 1.0
Karsten Hopp d8bb87
Content-Type: text/plain; charset=UTF-8
Karsten Hopp d8bb87
Content-Transfer-Encoding: 8bit
Karsten Hopp d8bb87
------------
Karsten Hopp d8bb87
Karsten Hopp d8bb87
Patch 7.3.695
Karsten Hopp d8bb87
Problem:    Balloon cannot show multi-byte text.
Karsten Hopp d8bb87
Solution:   Properly deal with multi-byte characters. (Dominique Pelle)
Karsten Hopp d8bb87
Files:      src/gui_beval.c, src/ui.c
Karsten Hopp d8bb87
Karsten Hopp d8bb87
Karsten Hopp d8bb87
*** ../vim-7.3.694/src/gui_beval.c	2010-08-15 21:57:28.000000000 +0200
Karsten Hopp d8bb87
--- src/gui_beval.c	2012-10-21 00:54:19.000000000 +0200
Karsten Hopp d8bb87
***************
Karsten Hopp d8bb87
*** 359,365 ****
Karsten Hopp d8bb87
  			}
Karsten Hopp d8bb87
  		    }
Karsten Hopp d8bb87
  
Karsten Hopp d8bb87
! 		    col = vcol2col(wp, lnum, col) - 1;
Karsten Hopp d8bb87
  
Karsten Hopp d8bb87
  		    if (VIsual_active
Karsten Hopp d8bb87
  			    && wp->w_buffer == curwin->w_buffer
Karsten Hopp d8bb87
--- 359,365 ----
Karsten Hopp d8bb87
  			}
Karsten Hopp d8bb87
  		    }
Karsten Hopp d8bb87
  
Karsten Hopp d8bb87
! 		    col = vcol2col(wp, lnum, col);
Karsten Hopp d8bb87
  
Karsten Hopp d8bb87
  		    if (VIsual_active
Karsten Hopp d8bb87
  			    && wp->w_buffer == curwin->w_buffer
Karsten Hopp d8bb87
***************
Karsten Hopp d8bb87
*** 377,384 ****
Karsten Hopp d8bb87
  			    return FAIL;
Karsten Hopp d8bb87
  
Karsten Hopp d8bb87
  			lbuf = ml_get_buf(curwin->w_buffer, VIsual.lnum, FALSE);
Karsten Hopp d8bb87
! 			lbuf = vim_strnsave(lbuf + spos->col,
Karsten Hopp d8bb87
! 				     epos->col - spos->col + (*p_sel != 'e'));
Karsten Hopp d8bb87
  			lnum = spos->lnum;
Karsten Hopp d8bb87
  			col = spos->col;
Karsten Hopp d8bb87
  		    }
Karsten Hopp d8bb87
--- 377,386 ----
Karsten Hopp d8bb87
  			    return FAIL;
Karsten Hopp d8bb87
  
Karsten Hopp d8bb87
  			lbuf = ml_get_buf(curwin->w_buffer, VIsual.lnum, FALSE);
Karsten Hopp d8bb87
! 			len = epos->col - spos->col;
Karsten Hopp d8bb87
! 			if (*p_sel != 'e')
Karsten Hopp d8bb87
! 			    len += MB_PTR2LEN(lbuf + epos->col);
Karsten Hopp d8bb87
! 			lbuf = vim_strnsave(lbuf + spos->col, len);
Karsten Hopp d8bb87
  			lnum = spos->lnum;
Karsten Hopp d8bb87
  			col = spos->col;
Karsten Hopp d8bb87
  		    }
Karsten Hopp d8bb87
*** ../vim-7.3.694/src/ui.c	2012-08-29 16:26:01.000000000 +0200
Karsten Hopp d8bb87
--- src/ui.c	2012-10-21 00:50:17.000000000 +0200
Karsten Hopp d8bb87
***************
Karsten Hopp d8bb87
*** 98,104 ****
Karsten Hopp d8bb87
  #endif
Karsten Hopp d8bb87
  
Karsten Hopp d8bb87
  /*
Karsten Hopp d8bb87
!  * ui_inchar(): low level input funcion.
Karsten Hopp d8bb87
   * Get characters from the keyboard.
Karsten Hopp d8bb87
   * Return the number of characters that are available.
Karsten Hopp d8bb87
   * If "wtime" == 0 do not wait for characters.
Karsten Hopp d8bb87
--- 98,104 ----
Karsten Hopp d8bb87
  #endif
Karsten Hopp d8bb87
  
Karsten Hopp d8bb87
  /*
Karsten Hopp d8bb87
!  * ui_inchar(): low level input function.
Karsten Hopp d8bb87
   * Get characters from the keyboard.
Karsten Hopp d8bb87
   * Return the number of characters that are available.
Karsten Hopp d8bb87
   * If "wtime" == 0 do not wait for characters.
Karsten Hopp d8bb87
***************
Karsten Hopp d8bb87
*** 493,499 ****
Karsten Hopp d8bb87
  	}
Karsten Hopp d8bb87
      }
Karsten Hopp d8bb87
  #else
Karsten Hopp d8bb87
!     /* Only own the clibpard when we didn't own it yet. */
Karsten Hopp d8bb87
      if (!cbd->owned && cbd->available)
Karsten Hopp d8bb87
  	cbd->owned = (clip_gen_own_selection(cbd) == OK);
Karsten Hopp d8bb87
  #endif
Karsten Hopp d8bb87
--- 493,499 ----
Karsten Hopp d8bb87
  	}
Karsten Hopp d8bb87
      }
Karsten Hopp d8bb87
  #else
Karsten Hopp d8bb87
!     /* Only own the clipboard when we didn't own it yet. */
Karsten Hopp d8bb87
      if (!cbd->owned && cbd->available)
Karsten Hopp d8bb87
  	cbd->owned = (clip_gen_own_selection(cbd) == OK);
Karsten Hopp d8bb87
  #endif
Karsten Hopp d8bb87
***************
Karsten Hopp d8bb87
*** 3132,3138 ****
Karsten Hopp d8bb87
      char_u	*start;
Karsten Hopp d8bb87
  
Karsten Hopp d8bb87
      start = ptr = ml_get_buf(wp->w_buffer, lnum, FALSE);
Karsten Hopp d8bb87
!     while (count <= vcol && *ptr != NUL)
Karsten Hopp d8bb87
      {
Karsten Hopp d8bb87
  	count += win_lbr_chartabsize(wp, ptr, count, NULL);
Karsten Hopp d8bb87
  	mb_ptr_adv(ptr);
Karsten Hopp d8bb87
--- 3132,3138 ----
Karsten Hopp d8bb87
      char_u	*start;
Karsten Hopp d8bb87
  
Karsten Hopp d8bb87
      start = ptr = ml_get_buf(wp->w_buffer, lnum, FALSE);
Karsten Hopp d8bb87
!     while (count < vcol && *ptr != NUL)
Karsten Hopp d8bb87
      {
Karsten Hopp d8bb87
  	count += win_lbr_chartabsize(wp, ptr, count, NULL);
Karsten Hopp d8bb87
  	mb_ptr_adv(ptr);
Karsten Hopp d8bb87
*** ../vim-7.3.694/src/version.c	2012-10-21 00:44:59.000000000 +0200
Karsten Hopp d8bb87
--- src/version.c	2012-10-21 00:50:32.000000000 +0200
Karsten Hopp d8bb87
***************
Karsten Hopp d8bb87
*** 721,722 ****
Karsten Hopp d8bb87
--- 721,724 ----
Karsten Hopp d8bb87
  {   /* Add new patch number below this line */
Karsten Hopp d8bb87
+ /**/
Karsten Hopp d8bb87
+     695,
Karsten Hopp d8bb87
  /**/
Karsten Hopp d8bb87
Karsten Hopp d8bb87
-- 
Karsten Hopp d8bb87
BEDEVERE:        Why do you think she is a witch?
Karsten Hopp d8bb87
SECOND VILLAGER: She turned me into a newt.
Karsten Hopp d8bb87
BEDEVERE:        A newt?
Karsten Hopp d8bb87
SECOND VILLAGER: (After looking at himself for some time) I got better.
Karsten Hopp d8bb87
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
Karsten Hopp d8bb87
Karsten Hopp d8bb87
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp d8bb87
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp d8bb87
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp d8bb87
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///