jkunstle / rpms / vim

Forked from rpms/vim 3 years ago
Clone

Blame SOURCES/7.4.408

3ef2ca
To: vim_dev@googlegroups.com
3ef2ca
Subject: Patch 7.4.408
3ef2ca
Fcc: outbox
3ef2ca
From: Bram Moolenaar <Bram@moolenaar.net>
3ef2ca
Mime-Version: 1.0
3ef2ca
Content-Type: text/plain; charset=UTF-8
3ef2ca
Content-Transfer-Encoding: 8bit
3ef2ca
------------
3ef2ca
3ef2ca
Patch 7.4.408
3ef2ca
Problem:    Visual block insert breaks a multi-byte character.
3ef2ca
Solution:   Calculate the position properly. (Yasuhiro Matsumoto)
3ef2ca
Files:	    src/ops.c, src/testdir/test_utf8.in, src/testdir/test_utf8.ok,
3ef2ca
	    src/testdir/Make_amiga.mak, src/testdir/Make_dos.mak,
3ef2ca
	    src/testdir/Make_ming.mak, src/testdir/Make_os2.mak,
3ef2ca
	    src/testdir/Make_vms.mms, src/testdir/Makefile
3ef2ca
3ef2ca
3ef2ca
*** ../vim-7.4.407/src/ops.c	2014-08-06 18:17:03.475147780 +0200
3ef2ca
--- src/ops.c	2014-08-16 18:33:34.625999952 +0200
3ef2ca
***************
3ef2ca
*** 609,614 ****
3ef2ca
--- 609,634 ----
3ef2ca
  	    }
3ef2ca
  	}
3ef2ca
  
3ef2ca
+ #ifdef FEAT_MBYTE
3ef2ca
+ 	if (has_mbyte && spaces > 0)
3ef2ca
+ 	{
3ef2ca
+ 	    /* Avoid starting halfway a multi-byte character. */
3ef2ca
+ 	    if (b_insert)
3ef2ca
+ 	    {
3ef2ca
+ 		int off = (*mb_head_off)(oldp, oldp + offset + spaces);
3ef2ca
+ 		spaces -= off;
3ef2ca
+ 		count -= off;
3ef2ca
+ 	    }
3ef2ca
+ 	    else
3ef2ca
+ 	    {
3ef2ca
+ 		int off = (*mb_off_next)(oldp, oldp + offset);
3ef2ca
+ 		offset += off;
3ef2ca
+ 		spaces = 0;
3ef2ca
+ 		count = 0;
3ef2ca
+ 	    }
3ef2ca
+ 	}
3ef2ca
+ #endif
3ef2ca
+ 
3ef2ca
  	newp = alloc_check((unsigned)(STRLEN(oldp)) + s_len + count + 1);
3ef2ca
  	if (newp == NULL)
3ef2ca
  	    continue;
3ef2ca
*** ../vim-7.4.407/src/testdir/test_utf8.in	2014-08-16 18:35:44.853995229 +0200
3ef2ca
--- src/testdir/test_utf8.in	2014-08-16 18:25:02.310018533 +0200
3ef2ca
***************
3ef2ca
*** 0 ****
3ef2ca
--- 1,18 ----
3ef2ca
+ Tests for Unicode manipulations                vim: set ft=vim :
3ef2ca
+  
3ef2ca
+ STARTTEST
3ef2ca
+ :so small.vim
3ef2ca
+ :set encoding=utf-8
3ef2ca
+ :" Visual block Insert adjusts for multi-byte char
3ef2ca
+ :new
3ef2ca
+ :call setline(1, ["aaa", "あああ", "bbb"])
3ef2ca
+ :exe ":norm! gg0l\<C-V>jjIx\<Esc>"
3ef2ca
+ :let r = getline(1, '$')
3ef2ca
+ :
3ef2ca
+ :bwipeout!
3ef2ca
+ :$put=r
3ef2ca
+ :call garbagecollect(1)
3ef2ca
+ :/^start:/,$wq! test.out
3ef2ca
+ ENDTEST
3ef2ca
+  
3ef2ca
+ start:
3ef2ca
*** ../vim-7.4.407/src/testdir/test_utf8.ok	2014-08-16 18:35:44.857995229 +0200
3ef2ca
--- src/testdir/test_utf8.ok	2014-08-16 18:25:35.354017334 +0200
3ef2ca
***************
3ef2ca
*** 0 ****
3ef2ca
--- 1,4 ----
3ef2ca
+ start:
3ef2ca
+ axaa
3ef2ca
+ xあああ
3ef2ca
+ bxbb
3ef2ca
*** ../vim-7.4.407/src/testdir/Make_amiga.mak	2014-07-30 16:00:45.547553496 +0200
3ef2ca
--- src/testdir/Make_amiga.mak	2014-08-16 18:28:17.694011447 +0200
3ef2ca
***************
3ef2ca
*** 38,50 ****
3ef2ca
  		test104.out test105.out test106.out test107.out \
3ef2ca
  		test_autoformat_join.out \
3ef2ca
  		test_breakindent.out \
3ef2ca
- 		test_listlbr.out \
3ef2ca
- 		test_listlbr_utf8.out \
3ef2ca
- 		test_qf_title.out \
3ef2ca
  		test_changelist.out \
3ef2ca
  		test_eval.out \
3ef2ca
  		test_insertcount.out \
3ef2ca
! 		test_options.out
3ef2ca
  
3ef2ca
  .SUFFIXES: .in .out
3ef2ca
  
3ef2ca
--- 38,51 ----
3ef2ca
  		test104.out test105.out test106.out test107.out \
3ef2ca
  		test_autoformat_join.out \
3ef2ca
  		test_breakindent.out \
3ef2ca
  		test_changelist.out \
3ef2ca
  		test_eval.out \
3ef2ca
  		test_insertcount.out \
3ef2ca
! 		test_listlbr.out \
3ef2ca
! 		test_listlbr_utf8.out \
3ef2ca
! 		test_options.out \
3ef2ca
! 		test_qf_title.out \
3ef2ca
! 		test_utf8.out
3ef2ca
  
3ef2ca
  .SUFFIXES: .in .out
3ef2ca
  
3ef2ca
***************
3ef2ca
*** 170,179 ****
3ef2ca
  test107.out: test107.in
3ef2ca
  test_autoformat_join.out: test_autoformat_join.in
3ef2ca
  test_breakindent.out: test_breakindent.in
3ef2ca
- test_listlbr.out: test_listlbr.in
3ef2ca
- test_listlbr_utf8.out: test_listlbr_utf8.in
3ef2ca
- test_qf_title.out: test_qf_title.in
3ef2ca
  test_changelist.out: test_changelist.in
3ef2ca
  test_eval.out: test_eval.in
3ef2ca
  test_insertcount.out: test_insertcount.in
3ef2ca
  test_options.out: test_options.in
3ef2ca
--- 171,181 ----
3ef2ca
  test107.out: test107.in
3ef2ca
  test_autoformat_join.out: test_autoformat_join.in
3ef2ca
  test_breakindent.out: test_breakindent.in
3ef2ca
  test_changelist.out: test_changelist.in
3ef2ca
  test_eval.out: test_eval.in
3ef2ca
  test_insertcount.out: test_insertcount.in
3ef2ca
+ test_listlbr.out: test_listlbr.in
3ef2ca
+ test_listlbr_utf8.out: test_listlbr_utf8.in
3ef2ca
  test_options.out: test_options.in
3ef2ca
+ test_qf_title.out: test_qf_title.in
3ef2ca
+ test_utf8.out: test_utf8.in
3ef2ca
*** ../vim-7.4.407/src/testdir/Make_dos.mak	2014-07-30 16:00:45.547553496 +0200
3ef2ca
--- src/testdir/Make_dos.mak	2014-08-16 18:28:37.122010742 +0200
3ef2ca
***************
3ef2ca
*** 37,49 ****
3ef2ca
  		test105.out test106.out  test107.out\
3ef2ca
  		test_autoformat_join.out \
3ef2ca
  		test_breakindent.out \
3ef2ca
- 		test_listlbr.out \
3ef2ca
- 		test_listlbr_utf8.out \
3ef2ca
- 		test_qf_title.out \
3ef2ca
  		test_changelist.out \
3ef2ca
  		test_eval.out \
3ef2ca
  		test_insertcount.out \
3ef2ca
! 		test_options.out
3ef2ca
  
3ef2ca
  SCRIPTS32 =	test50.out test70.out
3ef2ca
  
3ef2ca
--- 37,50 ----
3ef2ca
  		test105.out test106.out  test107.out\
3ef2ca
  		test_autoformat_join.out \
3ef2ca
  		test_breakindent.out \
3ef2ca
  		test_changelist.out \
3ef2ca
  		test_eval.out \
3ef2ca
  		test_insertcount.out \
3ef2ca
! 		test_listlbr.out \
3ef2ca
! 		test_listlbr_utf8.out \
3ef2ca
! 		test_options.out \
3ef2ca
! 		test_qf_title.out \
3ef2ca
! 		test_utf8.out
3ef2ca
  
3ef2ca
  SCRIPTS32 =	test50.out test70.out
3ef2ca
  
3ef2ca
*** ../vim-7.4.407/src/testdir/Make_ming.mak	2014-07-30 16:00:45.547553496 +0200
3ef2ca
--- src/testdir/Make_ming.mak	2014-08-16 18:28:56.438010041 +0200
3ef2ca
***************
3ef2ca
*** 57,69 ****
3ef2ca
  		test105.out test106.out test107.out \
3ef2ca
  		test_autoformat_join.out \
3ef2ca
  		test_breakindent.out \
3ef2ca
- 		test_listlbr.out \
3ef2ca
- 		test_listlbr_utf8.out \
3ef2ca
- 		test_qf_title.out \
3ef2ca
  		test_changelist.out \
3ef2ca
  		test_eval.out \
3ef2ca
  		test_insertcount.out \
3ef2ca
! 		test_options.out
3ef2ca
  
3ef2ca
  SCRIPTS32 =	test50.out test70.out
3ef2ca
  
3ef2ca
--- 57,70 ----
3ef2ca
  		test105.out test106.out test107.out \
3ef2ca
  		test_autoformat_join.out \
3ef2ca
  		test_breakindent.out \
3ef2ca
  		test_changelist.out \
3ef2ca
  		test_eval.out \
3ef2ca
  		test_insertcount.out \
3ef2ca
! 		test_listlbr.out \
3ef2ca
! 		test_listlbr_utf8.out \
3ef2ca
! 		test_options.out \
3ef2ca
! 		test_qf_title.out \
3ef2ca
! 		test_utf8.out
3ef2ca
  
3ef2ca
  SCRIPTS32 =	test50.out test70.out
3ef2ca
  
3ef2ca
*** ../vim-7.4.407/src/testdir/Make_os2.mak	2014-07-30 16:00:45.547553496 +0200
3ef2ca
--- src/testdir/Make_os2.mak	2014-08-16 18:29:26.962008934 +0200
3ef2ca
***************
3ef2ca
*** 38,51 ****
3ef2ca
  		test100.out test101.out test102.out test103.out test104.out \
3ef2ca
  		test105.out test106.out test107.out \
3ef2ca
  		test_autoformat_join.out \
3ef2ca
  		test_changelist.out \
3ef2ca
  		test_eval.out \
3ef2ca
  		test_insertcount.out \
3ef2ca
- 		test_breakindent.out \
3ef2ca
  		test_listlbr.out \
3ef2ca
  		test_listlbr_utf8.out \
3ef2ca
  		test_qf_title.out \
3ef2ca
! 		test_options.out
3ef2ca
  
3ef2ca
  .SUFFIXES: .in .out
3ef2ca
  
3ef2ca
--- 38,52 ----
3ef2ca
  		test100.out test101.out test102.out test103.out test104.out \
3ef2ca
  		test105.out test106.out test107.out \
3ef2ca
  		test_autoformat_join.out \
3ef2ca
+ 		test_breakindent.out \
3ef2ca
  		test_changelist.out \
3ef2ca
  		test_eval.out \
3ef2ca
  		test_insertcount.out \
3ef2ca
  		test_listlbr.out \
3ef2ca
  		test_listlbr_utf8.out \
3ef2ca
+ 		test_options.out \
3ef2ca
  		test_qf_title.out \
3ef2ca
! 		test_utf8.out
3ef2ca
  
3ef2ca
  .SUFFIXES: .in .out
3ef2ca
  
3ef2ca
*** ../vim-7.4.407/src/testdir/Make_vms.mms	2014-07-30 16:00:45.547553496 +0200
3ef2ca
--- src/testdir/Make_vms.mms	2014-08-16 18:29:42.702008364 +0200
3ef2ca
***************
3ef2ca
*** 4,10 ****
3ef2ca
  # Authors:	Zoltan Arpadffy, <arpadffy@polarhome.com>
3ef2ca
  #		Sandor Kopanyi,  <sandor.kopanyi@mailbox.hu>
3ef2ca
  #
3ef2ca
! # Last change:  2014 Jul 30
3ef2ca
  #
3ef2ca
  # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64.
3ef2ca
  # Edit the lines in the Configuration section below to select.
3ef2ca
--- 4,10 ----
3ef2ca
  # Authors:	Zoltan Arpadffy, <arpadffy@polarhome.com>
3ef2ca
  #		Sandor Kopanyi,  <sandor.kopanyi@mailbox.hu>
3ef2ca
  #
3ef2ca
! # Last change:  2014 Aug 16
3ef2ca
  #
3ef2ca
  # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64.
3ef2ca
  # Edit the lines in the Configuration section below to select.
3ef2ca
***************
3ef2ca
*** 98,110 ****
3ef2ca
  	 test105.out test106.out test107.out \
3ef2ca
  	 test_autoformat_join.out \
3ef2ca
  	 test_breakindent.out \
3ef2ca
- 	 test_listlbr.out \
3ef2ca
- 	 test_listlbr_utf8.out \
3ef2ca
- 	 test_qf_title.out \
3ef2ca
  	 test_changelist.out \
3ef2ca
  	 test_eval.out \
3ef2ca
  	 test_insertcount.out \
3ef2ca
! 	 test_options.out
3ef2ca
  
3ef2ca
  # Known problems:
3ef2ca
  # test17: ?
3ef2ca
--- 98,111 ----
3ef2ca
  	 test105.out test106.out test107.out \
3ef2ca
  	 test_autoformat_join.out \
3ef2ca
  	 test_breakindent.out \
3ef2ca
  	 test_changelist.out \
3ef2ca
  	 test_eval.out \
3ef2ca
  	 test_insertcount.out \
3ef2ca
! 	 test_listlbr.out \
3ef2ca
! 	 test_listlbr_utf8.out \
3ef2ca
! 	 test_options.out \
3ef2ca
! 	 test_qf_title.out \
3ef2ca
! 	 test_utf8.out
3ef2ca
  
3ef2ca
  # Known problems:
3ef2ca
  # test17: ?
3ef2ca
*** ../vim-7.4.407/src/testdir/Makefile	2014-07-30 16:00:45.547553496 +0200
3ef2ca
--- src/testdir/Makefile	2014-08-16 18:30:13.254007256 +0200
3ef2ca
***************
3ef2ca
*** 35,47 ****
3ef2ca
  		test104.out test105.out test106.out test107.out \
3ef2ca
  		test_autoformat_join.out \
3ef2ca
  		test_breakindent.out \
3ef2ca
- 		test_listlbr.out \
3ef2ca
- 		test_listlbr_utf8.out \
3ef2ca
- 		test_qf_title.out \
3ef2ca
  		test_changelist.out \
3ef2ca
  		test_eval.out \
3ef2ca
  		test_insertcount.out \
3ef2ca
! 		test_options.out
3ef2ca
  
3ef2ca
  SCRIPTS_GUI = test16.out
3ef2ca
  
3ef2ca
--- 35,48 ----
3ef2ca
  		test104.out test105.out test106.out test107.out \
3ef2ca
  		test_autoformat_join.out \
3ef2ca
  		test_breakindent.out \
3ef2ca
  		test_changelist.out \
3ef2ca
  		test_eval.out \
3ef2ca
  		test_insertcount.out \
3ef2ca
! 		test_listlbr.out \
3ef2ca
! 		test_listlbr_utf8.out \
3ef2ca
! 		test_options.out \
3ef2ca
! 		test_qf_title.out \
3ef2ca
! 		test_utf8.out
3ef2ca
  
3ef2ca
  SCRIPTS_GUI = test16.out
3ef2ca
  
3ef2ca
*** ../vim-7.4.407/src/version.c	2014-08-16 18:13:00.082044726 +0200
3ef2ca
--- src/version.c	2014-08-16 18:35:52.937994936 +0200
3ef2ca
***************
3ef2ca
*** 743,744 ****
3ef2ca
--- 743,746 ----
3ef2ca
  {   /* Add new patch number below this line */
3ef2ca
+ /**/
3ef2ca
+     408,
3ef2ca
  /**/
3ef2ca
3ef2ca
-- 
3ef2ca
What a wonderfully exciting cough!  Do you mind if I join you?
3ef2ca
		-- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"
3ef2ca
3ef2ca
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
3ef2ca
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
3ef2ca
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
3ef2ca
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///