| To: vim_dev@googlegroups.com |
| Subject: Patch 7.4.492 |
| 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.492 |
| Problem: In Insert mode, after inserting a newline that inserts a comment |
| leader, CTRL-O moves to the right. (ZyX) Issue 57. |
| Solution: Correct the condition for moving the cursor back to the NUL. |
| (Christian Brabandt) |
| Files: src/edit.c, src/testdir/test4.in, src/testdir/test4.ok |
| |
| |
| |
| |
| |
| *** 6916,6923 **** |
| } |
| if (curwin->w_cursor.lnum != tpos.lnum) |
| curwin->w_cursor = tpos; |
| ! else if (cc != NUL) |
| ! ++curwin->w_cursor.col; /* put cursor back on the NUL */ |
| |
| /* <C-S-Right> may have started Visual mode, adjust the position for |
| * deleted characters. */ |
| --- 6916,6927 ---- |
| } |
| if (curwin->w_cursor.lnum != tpos.lnum) |
| curwin->w_cursor = tpos; |
| ! else |
| ! { |
| ! tpos.col++; |
| ! if (cc != NUL && gchar_pos(&tpos) == NUL) |
| ! ++curwin->w_cursor.col; /* put cursor back on the NUL */ |
| ! } |
| |
| /* <C-S-Right> may have started Visual mode, adjust the position for |
| * deleted characters. */ |
| |
| |
| |
| *** 17,22 **** |
| --- 17,25 ---- |
| G?this is a |
| othis should be in column 1:wq " append text without autoindent to Xxx |
| G:r Xxx " include Xxx in the current file |
| + :set fo+=r " issue #57 do not move cursor on <c-o> when autoindent is set |
| + Go# abcdef2hi |
| + d0o# abcdef2hid0 |
| :?startstart?,$w! test.out |
| :qa! |
| ENDTEST |
| |
| |
| |
| *** 15,17 **** |
| --- 15,20 ---- |
| this is a test |
| this should be in column 1 |
| end of test file Xxx |
| + # abc |
| + def |
| + def |
| |
| |
| |
| *** 743,744 **** |
| --- 743,746 ---- |
| { /* Add new patch number below this line */ |
| + /**/ |
| + 492, |
| /**/ |
| |
| -- |
| DEAD PERSON: I'm getting better! |
| CUSTOMER: No, you're not -- you'll be stone dead in a moment. |
| MORTICIAN: Oh, I can't take him like that -- it's against regulations. |
| 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 /// |