| To: vim_dev@googlegroups.com |
| Subject: Patch 7.4.818 |
| Fcc: outbox |
| From: Bram Moolenaar <Bram@moolenaar.net> |
| Mime-Version: 1.0 |
| Content-Type: text/plain; charset=UTF-8 |
| Content-Transfer-Encoding: 8bit |
| |
| |
| Patch 7.4.818 |
| Problem: 'linebreak' breaks c% if the last Visual selection was block. |
| (Chris Morganiser, Issue 389) |
| Solution: Handle Visual block mode differently. (Christian Brabandt) |
| Files: src/normal.c, src/testdir/test_listlbr.in, |
| src/testdir/test_listlbr.ok |
| |
| |
| |
| |
| |
| *** 9583,9602 **** |
| #endif |
| |
| /* |
| ! * calculate start/end virtual columns for operating in block mode |
| */ |
| static void |
| get_op_vcol(oap, redo_VIsual_vcol, initial) |
| oparg_T *oap; |
| colnr_T redo_VIsual_vcol; |
| ! int initial; /* when true: adjust position for 'selectmode' */ |
| { |
| colnr_T start, end; |
| |
| ! if (VIsual_mode != Ctrl_V) |
| return; |
| |
| ! oap->block_mode = TRUE; |
| |
| #ifdef FEAT_MBYTE |
| /* prevent from moving onto a trail byte */ |
| --- 9583,9603 ---- |
| #endif |
| |
| /* |
| ! * Calculate start/end virtual columns for operating in block mode. |
| */ |
| static void |
| get_op_vcol(oap, redo_VIsual_vcol, initial) |
| oparg_T *oap; |
| colnr_T redo_VIsual_vcol; |
| ! int initial; /* when TRUE adjust position for 'selectmode' */ |
| { |
| colnr_T start, end; |
| |
| ! if (VIsual_mode != Ctrl_V |
| ! || (!initial && oap->end.col < W_WIDTH(curwin))) |
| return; |
| |
| ! oap->block_mode = VIsual_active; |
| |
| #ifdef FEAT_MBYTE |
| /* prevent from moving onto a trail byte */ |
| |
| |
| |
| *** 80,85 **** |
| --- 80,92 ---- |
| aaa |
| aaa |
| a2k2j~e. |
| + :let g:test ="Test 10: using normal commands after block-visual" |
| + :$put =g:test |
| + :set linebreak |
| + Go |
| + abcd{ef |
| + ghijklm |
| + no}pqrs2k0f{c% |
| :%w! test.out |
| :qa! |
| ENDTEST |
| |
| |
| |
| *** 46,48 **** |
| --- 46,51 ---- |
| AaA |
| AaA |
| A |
| + Test 10: using normal commands after block-visual |
| + |
| + abcdpqrs |
| |
| |
| |
| *** 743,744 **** |
| --- 743,746 ---- |
| { /* Add new patch number below this line */ |
| + /**/ |
| + 818, |
| /**/ |
| |
| -- |
| ARTHUR: Be quiet! |
| DENNIS: --but by a two-thirds majority in the case of more-- |
| ARTHUR: Be quiet! I order you to be quiet! |
| WOMAN: Order, eh -- who does he think he is? |
| ARTHUR: I am your king! |
| The Quest for the Holy Grail (Monty Python) |
| |
| /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ |
| /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ |
| \\\ an exciting new programming language -- http://www.Zimbu.org /// |
| \\\ help me help AIDS victims -- http://ICCF-Holland.org /// |