|
|
22c937 |
To: vim_dev@googlegroups.com
|
|
|
22c937 |
Subject: Patch 7.4.199
|
|
|
22c937 |
Fcc: outbox
|
|
|
22c937 |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
|
22c937 |
Mime-Version: 1.0
|
|
|
22c937 |
Content-Type: text/plain; charset=UTF-8
|
|
|
22c937 |
Content-Transfer-Encoding: 8bit
|
|
|
22c937 |
------------
|
|
|
22c937 |
|
|
|
22c937 |
Patch 7.4.199
|
|
|
22c937 |
Problem: (issue 197) ]P doesn't paste over Visual selection.
|
|
|
22c937 |
Solution: Handle Visual mode specifically. (Christian Brabandt)
|
|
|
22c937 |
Files: src/normal.c
|
|
|
22c937 |
|
|
|
22c937 |
|
|
|
22c937 |
*** ../vim-7.4.198/src/normal.c 2014-02-23 23:38:58.824760280 +0100
|
|
|
22c937 |
--- src/normal.c 2014-03-12 17:33:28.184831049 +0100
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 6751,6760 ****
|
|
|
22c937 |
{
|
|
|
22c937 |
if (!checkclearop(cap->oap))
|
|
|
22c937 |
{
|
|
|
22c937 |
prep_redo_cmd(cap);
|
|
|
22c937 |
! do_put(cap->oap->regname,
|
|
|
22c937 |
! (cap->cmdchar == ']' && cap->nchar == 'p') ? FORWARD : BACKWARD,
|
|
|
22c937 |
! cap->count1, PUT_FIXINDENT);
|
|
|
22c937 |
}
|
|
|
22c937 |
}
|
|
|
22c937 |
|
|
|
22c937 |
--- 6751,6808 ----
|
|
|
22c937 |
{
|
|
|
22c937 |
if (!checkclearop(cap->oap))
|
|
|
22c937 |
{
|
|
|
22c937 |
+ int dir = (cap->cmdchar == ']' && cap->nchar == 'p')
|
|
|
22c937 |
+ ? FORWARD : BACKWARD;
|
|
|
22c937 |
+ int regname = cap->oap->regname;
|
|
|
22c937 |
+ #ifdef FEAT_VISUAL
|
|
|
22c937 |
+ int was_visual = VIsual_active;
|
|
|
22c937 |
+ int line_count = curbuf->b_ml.ml_line_count;
|
|
|
22c937 |
+ pos_T start, end;
|
|
|
22c937 |
+
|
|
|
22c937 |
+ if (VIsual_active)
|
|
|
22c937 |
+ {
|
|
|
22c937 |
+ start = ltoreq(VIsual, curwin->w_cursor)
|
|
|
22c937 |
+ ? VIsual : curwin->w_cursor;
|
|
|
22c937 |
+ end = equalpos(start,VIsual) ? curwin->w_cursor : VIsual;
|
|
|
22c937 |
+ curwin->w_cursor = (dir == BACKWARD ? start : end);
|
|
|
22c937 |
+ }
|
|
|
22c937 |
+ #endif
|
|
|
22c937 |
+ # ifdef FEAT_CLIPBOARD
|
|
|
22c937 |
+ adjust_clip_reg(®name);
|
|
|
22c937 |
+ # endif
|
|
|
22c937 |
prep_redo_cmd(cap);
|
|
|
22c937 |
!
|
|
|
22c937 |
! do_put(regname, dir, cap->count1, PUT_FIXINDENT);
|
|
|
22c937 |
! #ifdef FEAT_VISUAL
|
|
|
22c937 |
! if (was_visual)
|
|
|
22c937 |
! {
|
|
|
22c937 |
! VIsual = start;
|
|
|
22c937 |
! curwin->w_cursor = end;
|
|
|
22c937 |
! if (dir == BACKWARD)
|
|
|
22c937 |
! {
|
|
|
22c937 |
! /* adjust lines */
|
|
|
22c937 |
! VIsual.lnum += curbuf->b_ml.ml_line_count - line_count;
|
|
|
22c937 |
! curwin->w_cursor.lnum +=
|
|
|
22c937 |
! curbuf->b_ml.ml_line_count - line_count;
|
|
|
22c937 |
! }
|
|
|
22c937 |
!
|
|
|
22c937 |
! VIsual_active = TRUE;
|
|
|
22c937 |
! if (VIsual_mode == 'V')
|
|
|
22c937 |
! {
|
|
|
22c937 |
! /* delete visually selected lines */
|
|
|
22c937 |
! cap->cmdchar = 'd';
|
|
|
22c937 |
! cap->nchar = NUL;
|
|
|
22c937 |
! cap->oap->regname = regname;
|
|
|
22c937 |
! nv_operator(cap);
|
|
|
22c937 |
! do_pending_operator(cap, 0, FALSE);
|
|
|
22c937 |
! }
|
|
|
22c937 |
! if (VIsual_active)
|
|
|
22c937 |
! {
|
|
|
22c937 |
! end_visual_mode();
|
|
|
22c937 |
! redraw_later(SOME_VALID);
|
|
|
22c937 |
! }
|
|
|
22c937 |
! }
|
|
|
22c937 |
! #endif
|
|
|
22c937 |
}
|
|
|
22c937 |
}
|
|
|
22c937 |
|
|
|
22c937 |
*** ../vim-7.4.198/src/version.c 2014-03-12 17:08:01.508807656 +0100
|
|
|
22c937 |
--- src/version.c 2014-03-12 17:30:36.908828425 +0100
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 740,741 ****
|
|
|
22c937 |
--- 740,743 ----
|
|
|
22c937 |
{ /* Add new patch number below this line */
|
|
|
22c937 |
+ /**/
|
|
|
22c937 |
+ 199,
|
|
|
22c937 |
/**/
|
|
|
22c937 |
|
|
|
22c937 |
--
|
|
|
22c937 |
No man may purchase alcohol without written consent from his wife.
|
|
|
22c937 |
[real standing law in Pennsylvania, United States of America]
|
|
|
22c937 |
|
|
|
22c937 |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
|
22c937 |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
|
22c937 |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
|
22c937 |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|