|
Karsten Hopp |
e3a73a |
To: vim_dev@googlegroups.com
|
|
Karsten Hopp |
e3a73a |
Subject: Patch 7.4.492
|
|
Karsten Hopp |
e3a73a |
Fcc: outbox
|
|
Karsten Hopp |
e3a73a |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
e3a73a |
Mime-Version: 1.0
|
|
Karsten Hopp |
e3a73a |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
e3a73a |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
e3a73a |
------------
|
|
Karsten Hopp |
e3a73a |
|
|
Karsten Hopp |
e3a73a |
Patch 7.4.492
|
|
Karsten Hopp |
e3a73a |
Problem: In Insert mode, after inserting a newline that inserts a comment
|
|
Karsten Hopp |
e3a73a |
leader, CTRL-O moves to the right. (ZyX) Issue 57.
|
|
Karsten Hopp |
e3a73a |
Solution: Correct the condition for moving the cursor back to the NUL.
|
|
Karsten Hopp |
e3a73a |
(Christian Brabandt)
|
|
Karsten Hopp |
e3a73a |
Files: src/edit.c, src/testdir/test4.in, src/testdir/test4.ok
|
|
Karsten Hopp |
e3a73a |
|
|
Karsten Hopp |
e3a73a |
|
|
Karsten Hopp |
e3a73a |
*** ../vim-7.4.491/src/edit.c 2014-09-09 18:29:24.328549561 +0200
|
|
Karsten Hopp |
e3a73a |
--- src/edit.c 2014-10-31 19:10:47.474756984 +0100
|
|
Karsten Hopp |
e3a73a |
***************
|
|
Karsten Hopp |
e3a73a |
*** 6916,6923 ****
|
|
Karsten Hopp |
e3a73a |
}
|
|
Karsten Hopp |
e3a73a |
if (curwin->w_cursor.lnum != tpos.lnum)
|
|
Karsten Hopp |
e3a73a |
curwin->w_cursor = tpos;
|
|
Karsten Hopp |
e3a73a |
! else if (cc != NUL)
|
|
Karsten Hopp |
e3a73a |
! ++curwin->w_cursor.col; /* put cursor back on the NUL */
|
|
Karsten Hopp |
e3a73a |
|
|
Karsten Hopp |
e3a73a |
/* <C-S-Right> may have started Visual mode, adjust the position for
|
|
Karsten Hopp |
e3a73a |
* deleted characters. */
|
|
Karsten Hopp |
e3a73a |
--- 6916,6927 ----
|
|
Karsten Hopp |
e3a73a |
}
|
|
Karsten Hopp |
e3a73a |
if (curwin->w_cursor.lnum != tpos.lnum)
|
|
Karsten Hopp |
e3a73a |
curwin->w_cursor = tpos;
|
|
Karsten Hopp |
e3a73a |
! else
|
|
Karsten Hopp |
e3a73a |
! {
|
|
Karsten Hopp |
e3a73a |
! tpos.col++;
|
|
Karsten Hopp |
e3a73a |
! if (cc != NUL && gchar_pos(&tpos) == NUL)
|
|
Karsten Hopp |
e3a73a |
! ++curwin->w_cursor.col; /* put cursor back on the NUL */
|
|
Karsten Hopp |
e3a73a |
! }
|
|
Karsten Hopp |
e3a73a |
|
|
Karsten Hopp |
e3a73a |
/* <C-S-Right> may have started Visual mode, adjust the position for
|
|
Karsten Hopp |
e3a73a |
* deleted characters. */
|
|
Karsten Hopp |
e3a73a |
*** ../vim-7.4.491/src/testdir/test4.in 2010-05-15 13:04:10.000000000 +0200
|
|
Karsten Hopp |
e3a73a |
--- src/testdir/test4.in 2014-10-31 19:10:21.846757602 +0100
|
|
Karsten Hopp |
e3a73a |
***************
|
|
Karsten Hopp |
e3a73a |
*** 17,22 ****
|
|
Karsten Hopp |
e3a73a |
--- 17,25 ----
|
|
Karsten Hopp |
e3a73a |
G?this is a
|
|
Karsten Hopp |
e3a73a |
othis should be in column 1?:wq " append text without autoindent to Xxx
|
|
Karsten Hopp |
e3a73a |
G:r Xxx " include Xxx in the current file
|
|
Karsten Hopp |
e3a73a |
+ :set fo+=r " issue #57 do not move cursor on <c-o> when autoindent is set
|
|
Karsten Hopp |
e3a73a |
+ Go# abcdef?2hi
|
|
Karsten Hopp |
e3a73a |
+ ?d0?o# abcdef?2hi?d0?
|
|
Karsten Hopp |
e3a73a |
:?startstart?,$w! test.out
|
|
Karsten Hopp |
e3a73a |
:qa!
|
|
Karsten Hopp |
e3a73a |
ENDTEST
|
|
Karsten Hopp |
e3a73a |
*** ../vim-7.4.491/src/testdir/test4.ok 2010-05-15 13:04:10.000000000 +0200
|
|
Karsten Hopp |
e3a73a |
--- src/testdir/test4.ok 2014-10-31 19:10:21.846757602 +0100
|
|
Karsten Hopp |
e3a73a |
***************
|
|
Karsten Hopp |
e3a73a |
*** 15,17 ****
|
|
Karsten Hopp |
e3a73a |
--- 15,20 ----
|
|
Karsten Hopp |
e3a73a |
this is a test
|
|
Karsten Hopp |
e3a73a |
this should be in column 1
|
|
Karsten Hopp |
e3a73a |
end of test file Xxx
|
|
Karsten Hopp |
e3a73a |
+ # abc
|
|
Karsten Hopp |
e3a73a |
+ def
|
|
Karsten Hopp |
e3a73a |
+ def
|
|
Karsten Hopp |
e3a73a |
*** ../vim-7.4.491/src/version.c 2014-10-31 15:45:49.175053328 +0100
|
|
Karsten Hopp |
e3a73a |
--- src/version.c 2014-10-31 19:13:31.230753038 +0100
|
|
Karsten Hopp |
e3a73a |
***************
|
|
Karsten Hopp |
e3a73a |
*** 743,744 ****
|
|
Karsten Hopp |
e3a73a |
--- 743,746 ----
|
|
Karsten Hopp |
e3a73a |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
e3a73a |
+ /**/
|
|
Karsten Hopp |
e3a73a |
+ 492,
|
|
Karsten Hopp |
e3a73a |
/**/
|
|
Karsten Hopp |
e3a73a |
|
|
Karsten Hopp |
e3a73a |
--
|
|
Karsten Hopp |
e3a73a |
DEAD PERSON: I'm getting better!
|
|
Karsten Hopp |
e3a73a |
CUSTOMER: No, you're not -- you'll be stone dead in a moment.
|
|
Karsten Hopp |
e3a73a |
MORTICIAN: Oh, I can't take him like that -- it's against regulations.
|
|
Karsten Hopp |
e3a73a |
The Quest for the Holy Grail (Monty Python)
|
|
Karsten Hopp |
e3a73a |
|
|
Karsten Hopp |
e3a73a |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
e3a73a |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
e3a73a |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
Karsten Hopp |
e3a73a |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|