mirror of
https://github.com/neovim/neovim.git
synced 2025-09-12 22:38:16 +00:00
vim-patch:7.4.467: Avoid a problem with unwanted linebreaks in block mode
vim-patch:7.4.467 Avoid a problem with unwanted linebreaks in block mode https://code.google.com/p/vim/source/detail?r=v7-4-467
This commit is contained in:
@@ -1099,6 +1099,10 @@ void do_pending_operator(cmdarg_T *cap, int old_col, bool gui_yank)
|
|||||||
pos_T old_cursor;
|
pos_T old_cursor;
|
||||||
bool empty_region_error;
|
bool empty_region_error;
|
||||||
int restart_edit_save;
|
int restart_edit_save;
|
||||||
|
int lbr_saved = curwin->w_p_lbr;
|
||||||
|
|
||||||
|
curwin->w_p_lbr = false; /* avoid a problem with unwanted linebreaks in
|
||||||
|
* block mode */
|
||||||
|
|
||||||
/* The visual area is remembered for redo */
|
/* The visual area is remembered for redo */
|
||||||
static int redo_VIsual_mode = NUL; /* 'v', 'V', or Ctrl-V */
|
static int redo_VIsual_mode = NUL; /* 'v', 'V', or Ctrl-V */
|
||||||
@@ -1711,6 +1715,7 @@ void do_pending_operator(cmdarg_T *cap, int old_col, bool gui_yank)
|
|||||||
oap->block_mode = false;
|
oap->block_mode = false;
|
||||||
clearop(oap);
|
clearop(oap);
|
||||||
}
|
}
|
||||||
|
curwin->w_p_lbr = lbr_saved;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@@ -1205,8 +1205,13 @@ static void win_update(win_T *wp)
|
|||||||
*/
|
*/
|
||||||
if (VIsual_mode == Ctrl_V) {
|
if (VIsual_mode == Ctrl_V) {
|
||||||
colnr_T fromc, toc;
|
colnr_T fromc, toc;
|
||||||
|
int save_ve_flags = ve_flags;
|
||||||
|
|
||||||
|
if (curwin->w_p_lbr)
|
||||||
|
ve_flags = VE_ALL;
|
||||||
|
|
||||||
getvcols(wp, &VIsual, &curwin->w_cursor, &fromc, &toc);
|
getvcols(wp, &VIsual, &curwin->w_cursor, &fromc, &toc);
|
||||||
|
ve_flags = save_ve_flags;
|
||||||
++toc;
|
++toc;
|
||||||
if (curwin->w_curswant == MAXCOL)
|
if (curwin->w_curswant == MAXCOL)
|
||||||
toc = MAXCOL;
|
toc = MAXCOL;
|
||||||
|
@@ -56,6 +56,14 @@ STARTTEST
|
|||||||
:syn match All /.*/ contains=ConcealVar
|
:syn match All /.*/ contains=ConcealVar
|
||||||
:let line=ScreenChar(winwidth(0))
|
:let line=ScreenChar(winwidth(0))
|
||||||
:call DoRecordScreen()
|
:call DoRecordScreen()
|
||||||
|
:set cpo&vim linebreak
|
||||||
|
:let g:test ="Test 6: set linebreak with visual block mode"
|
||||||
|
:let line="REMOVE: this not"
|
||||||
|
:$put =line
|
||||||
|
:let line="REMOVE: aaaaaaaaaaaaa"
|
||||||
|
:$put =line
|
||||||
|
:1/^REMOVE:
|
||||||
|
0jf x:$put
|
||||||
:%w! test.out
|
:%w! test.out
|
||||||
:qa!
|
:qa!
|
||||||
ENDTEST
|
ENDTEST
|
||||||
|
@@ -32,3 +32,7 @@ Sabbbbbb bla
|
|||||||
~
|
~
|
||||||
~
|
~
|
||||||
~
|
~
|
||||||
|
this not
|
||||||
|
aaaaaaaaaaaaa
|
||||||
|
REMOVE:
|
||||||
|
REMOVE:
|
||||||
|
@@ -199,7 +199,7 @@ static int included_patches[] = {
|
|||||||
//470,
|
//470,
|
||||||
//469,
|
//469,
|
||||||
//468,
|
//468,
|
||||||
//467,
|
467,
|
||||||
//465,
|
//465,
|
||||||
//464,
|
//464,
|
||||||
//463,
|
//463,
|
||||||
|
Reference in New Issue
Block a user