home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / patches / 7.4 / 7.4.408 < prev    next >
Encoding:
Internet Message Format  |  2014-08-16  |  9.1 KB

  1. To: vim_dev@googlegroups.com
  2. Subject: Patch 7.4.408
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. Mime-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 7.4.408
  11. Problem:    Visual block insert breaks a multi-byte character.
  12. Solution:   Calculate the position properly. (Yasuhiro Matsumoto)
  13. Files:        src/ops.c, src/testdir/test_utf8.in, src/testdir/test_utf8.ok,
  14.         src/testdir/Make_amiga.mak, src/testdir/Make_dos.mak,
  15.         src/testdir/Make_ming.mak, src/testdir/Make_os2.mak,
  16.         src/testdir/Make_vms.mms, src/testdir/Makefile
  17.  
  18.  
  19. *** ../vim-7.4.407/src/ops.c    2014-08-06 18:17:03.475147780 +0200
  20. --- src/ops.c    2014-08-16 18:33:34.625999952 +0200
  21. ***************
  22. *** 609,614 ****
  23. --- 609,634 ----
  24.           }
  25.       }
  26.   
  27. + #ifdef FEAT_MBYTE
  28. +     if (has_mbyte && spaces > 0)
  29. +     {
  30. +         /* Avoid starting halfway a multi-byte character. */
  31. +         if (b_insert)
  32. +         {
  33. +         int off = (*mb_head_off)(oldp, oldp + offset + spaces);
  34. +         spaces -= off;
  35. +         count -= off;
  36. +         }
  37. +         else
  38. +         {
  39. +         int off = (*mb_off_next)(oldp, oldp + offset);
  40. +         offset += off;
  41. +         spaces = 0;
  42. +         count = 0;
  43. +         }
  44. +     }
  45. + #endif
  46.       newp = alloc_check((unsigned)(STRLEN(oldp)) + s_len + count + 1);
  47.       if (newp == NULL)
  48.           continue;
  49. *** ../vim-7.4.407/src/testdir/test_utf8.in    2014-08-16 18:35:44.853995229 +0200
  50. --- src/testdir/test_utf8.in    2014-08-16 18:25:02.310018533 +0200
  51. ***************
  52. *** 0 ****
  53. --- 1,18 ----
  54. + Tests for Unicode manipulations                vim: set ft=vim :
  55. +  
  56. + STARTTEST
  57. + :so small.vim
  58. + :set encoding=utf-8
  59. + :" Visual block Insert adjusts for multi-byte char
  60. + :new
  61. + :call setline(1, ["aaa", "πüéπüéπüé", "bbb"])
  62. + :exe ":norm! gg0l\<C-V>jjIx\<Esc>"
  63. + :let r = getline(1, '$')
  64. + :
  65. + :bwipeout!
  66. + :$put=r
  67. + :call garbagecollect(1)
  68. + :/^start:/,$wq! test.out
  69. + ENDTEST
  70. +  
  71. + start:
  72. *** ../vim-7.4.407/src/testdir/test_utf8.ok    2014-08-16 18:35:44.857995229 +0200
  73. --- src/testdir/test_utf8.ok    2014-08-16 18:25:35.354017334 +0200
  74. ***************
  75. *** 0 ****
  76. --- 1,4 ----
  77. + start:
  78. + axaa
  79. + xπüéπüéπüé
  80. + bxbb
  81. *** ../vim-7.4.407/src/testdir/Make_amiga.mak    2014-07-30 16:00:45.547553496 +0200
  82. --- src/testdir/Make_amiga.mak    2014-08-16 18:28:17.694011447 +0200
  83. ***************
  84. *** 38,50 ****
  85.           test104.out test105.out test106.out test107.out \
  86.           test_autoformat_join.out \
  87.           test_breakindent.out \
  88. -         test_listlbr.out \
  89. -         test_listlbr_utf8.out \
  90. -         test_qf_title.out \
  91.           test_changelist.out \
  92.           test_eval.out \
  93.           test_insertcount.out \
  94. !         test_options.out
  95.   
  96.   .SUFFIXES: .in .out
  97.   
  98. --- 38,51 ----
  99.           test104.out test105.out test106.out test107.out \
  100.           test_autoformat_join.out \
  101.           test_breakindent.out \
  102.           test_changelist.out \
  103.           test_eval.out \
  104.           test_insertcount.out \
  105. !         test_listlbr.out \
  106. !         test_listlbr_utf8.out \
  107. !         test_options.out \
  108. !         test_qf_title.out \
  109. !         test_utf8.out
  110.   
  111.   .SUFFIXES: .in .out
  112.   
  113. ***************
  114. *** 170,179 ****
  115.   test107.out: test107.in
  116.   test_autoformat_join.out: test_autoformat_join.in
  117.   test_breakindent.out: test_breakindent.in
  118. - test_listlbr.out: test_listlbr.in
  119. - test_listlbr_utf8.out: test_listlbr_utf8.in
  120. - test_qf_title.out: test_qf_title.in
  121.   test_changelist.out: test_changelist.in
  122.   test_eval.out: test_eval.in
  123.   test_insertcount.out: test_insertcount.in
  124.   test_options.out: test_options.in
  125. --- 171,181 ----
  126.   test107.out: test107.in
  127.   test_autoformat_join.out: test_autoformat_join.in
  128.   test_breakindent.out: test_breakindent.in
  129.   test_changelist.out: test_changelist.in
  130.   test_eval.out: test_eval.in
  131.   test_insertcount.out: test_insertcount.in
  132. + test_listlbr.out: test_listlbr.in
  133. + test_listlbr_utf8.out: test_listlbr_utf8.in
  134.   test_options.out: test_options.in
  135. + test_qf_title.out: test_qf_title.in
  136. + test_utf8.out: test_utf8.in
  137. *** ../vim-7.4.407/src/testdir/Make_dos.mak    2014-07-30 16:00:45.547553496 +0200
  138. --- src/testdir/Make_dos.mak    2014-08-16 18:28:37.122010742 +0200
  139. ***************
  140. *** 37,49 ****
  141.           test105.out test106.out  test107.out\
  142.           test_autoformat_join.out \
  143.           test_breakindent.out \
  144. -         test_listlbr.out \
  145. -         test_listlbr_utf8.out \
  146. -         test_qf_title.out \
  147.           test_changelist.out \
  148.           test_eval.out \
  149.           test_insertcount.out \
  150. !         test_options.out
  151.   
  152.   SCRIPTS32 =    test50.out test70.out
  153.   
  154. --- 37,50 ----
  155.           test105.out test106.out  test107.out\
  156.           test_autoformat_join.out \
  157.           test_breakindent.out \
  158.           test_changelist.out \
  159.           test_eval.out \
  160.           test_insertcount.out \
  161. !         test_listlbr.out \
  162. !         test_listlbr_utf8.out \
  163. !         test_options.out \
  164. !         test_qf_title.out \
  165. !         test_utf8.out
  166.   
  167.   SCRIPTS32 =    test50.out test70.out
  168.   
  169. *** ../vim-7.4.407/src/testdir/Make_ming.mak    2014-07-30 16:00:45.547553496 +0200
  170. --- src/testdir/Make_ming.mak    2014-08-16 18:28:56.438010041 +0200
  171. ***************
  172. *** 57,69 ****
  173.           test105.out test106.out test107.out \
  174.           test_autoformat_join.out \
  175.           test_breakindent.out \
  176. -         test_listlbr.out \
  177. -         test_listlbr_utf8.out \
  178. -         test_qf_title.out \
  179.           test_changelist.out \
  180.           test_eval.out \
  181.           test_insertcount.out \
  182. !         test_options.out
  183.   
  184.   SCRIPTS32 =    test50.out test70.out
  185.   
  186. --- 57,70 ----
  187.           test105.out test106.out test107.out \
  188.           test_autoformat_join.out \
  189.           test_breakindent.out \
  190.           test_changelist.out \
  191.           test_eval.out \
  192.           test_insertcount.out \
  193. !         test_listlbr.out \
  194. !         test_listlbr_utf8.out \
  195. !         test_options.out \
  196. !         test_qf_title.out \
  197. !         test_utf8.out
  198.   
  199.   SCRIPTS32 =    test50.out test70.out
  200.   
  201. *** ../vim-7.4.407/src/testdir/Make_os2.mak    2014-07-30 16:00:45.547553496 +0200
  202. --- src/testdir/Make_os2.mak    2014-08-16 18:29:26.962008934 +0200
  203. ***************
  204. *** 38,51 ****
  205.           test100.out test101.out test102.out test103.out test104.out \
  206.           test105.out test106.out test107.out \
  207.           test_autoformat_join.out \
  208.           test_changelist.out \
  209.           test_eval.out \
  210.           test_insertcount.out \
  211. -         test_breakindent.out \
  212.           test_listlbr.out \
  213.           test_listlbr_utf8.out \
  214.           test_qf_title.out \
  215. !         test_options.out
  216.   
  217.   .SUFFIXES: .in .out
  218.   
  219. --- 38,52 ----
  220.           test100.out test101.out test102.out test103.out test104.out \
  221.           test105.out test106.out test107.out \
  222.           test_autoformat_join.out \
  223. +         test_breakindent.out \
  224.           test_changelist.out \
  225.           test_eval.out \
  226.           test_insertcount.out \
  227.           test_listlbr.out \
  228.           test_listlbr_utf8.out \
  229. +         test_options.out \
  230.           test_qf_title.out \
  231. !         test_utf8.out
  232.   
  233.   .SUFFIXES: .in .out
  234.   
  235. *** ../vim-7.4.407/src/testdir/Make_vms.mms    2014-07-30 16:00:45.547553496 +0200
  236. --- src/testdir/Make_vms.mms    2014-08-16 18:29:42.702008364 +0200
  237. ***************
  238. *** 4,10 ****
  239.   # Authors:    Zoltan Arpadffy, <arpadffy@polarhome.com>
  240.   #        Sandor Kopanyi,  <sandor.kopanyi@mailbox.hu>
  241.   #
  242. ! # Last change:  2014 Jul 30
  243.   #
  244.   # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64.
  245.   # Edit the lines in the Configuration section below to select.
  246. --- 4,10 ----
  247.   # Authors:    Zoltan Arpadffy, <arpadffy@polarhome.com>
  248.   #        Sandor Kopanyi,  <sandor.kopanyi@mailbox.hu>
  249.   #
  250. ! # Last change:  2014 Aug 16
  251.   #
  252.   # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64.
  253.   # Edit the lines in the Configuration section below to select.
  254. ***************
  255. *** 98,110 ****
  256.        test105.out test106.out test107.out \
  257.        test_autoformat_join.out \
  258.        test_breakindent.out \
  259. -      test_listlbr.out \
  260. -      test_listlbr_utf8.out \
  261. -      test_qf_title.out \
  262.        test_changelist.out \
  263.        test_eval.out \
  264.        test_insertcount.out \
  265. !      test_options.out
  266.   
  267.   # Known problems:
  268.   # test17: ?
  269. --- 98,111 ----
  270.        test105.out test106.out test107.out \
  271.        test_autoformat_join.out \
  272.        test_breakindent.out \
  273.        test_changelist.out \
  274.        test_eval.out \
  275.        test_insertcount.out \
  276. !      test_listlbr.out \
  277. !      test_listlbr_utf8.out \
  278. !      test_options.out \
  279. !      test_qf_title.out \
  280. !      test_utf8.out
  281.   
  282.   # Known problems:
  283.   # test17: ?
  284. *** ../vim-7.4.407/src/testdir/Makefile    2014-07-30 16:00:45.547553496 +0200
  285. --- src/testdir/Makefile    2014-08-16 18:30:13.254007256 +0200
  286. ***************
  287. *** 35,47 ****
  288.           test104.out test105.out test106.out test107.out \
  289.           test_autoformat_join.out \
  290.           test_breakindent.out \
  291. -         test_listlbr.out \
  292. -         test_listlbr_utf8.out \
  293. -         test_qf_title.out \
  294.           test_changelist.out \
  295.           test_eval.out \
  296.           test_insertcount.out \
  297. !         test_options.out
  298.   
  299.   SCRIPTS_GUI = test16.out
  300.   
  301. --- 35,48 ----
  302.           test104.out test105.out test106.out test107.out \
  303.           test_autoformat_join.out \
  304.           test_breakindent.out \
  305.           test_changelist.out \
  306.           test_eval.out \
  307.           test_insertcount.out \
  308. !         test_listlbr.out \
  309. !         test_listlbr_utf8.out \
  310. !         test_options.out \
  311. !         test_qf_title.out \
  312. !         test_utf8.out
  313.   
  314.   SCRIPTS_GUI = test16.out
  315.   
  316. *** ../vim-7.4.407/src/version.c    2014-08-16 18:13:00.082044726 +0200
  317. --- src/version.c    2014-08-16 18:35:52.937994936 +0200
  318. ***************
  319. *** 743,744 ****
  320. --- 743,746 ----
  321.   {   /* Add new patch number below this line */
  322. + /**/
  323. +     408,
  324.   /**/
  325.  
  326. -- 
  327. What a wonderfully exciting cough!  Do you mind if I join you?
  328.         -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"
  329.  
  330.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  331. ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  332. \\\  an exciting new programming language -- http://www.Zimbu.org        ///
  333.  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
  334.