mirror of
https://github.com/neovim/neovim.git
synced 2024-12-25 13:45:15 -07: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:
parent
cfa8b4a186
commit
35e2398441
@ -1099,6 +1099,10 @@ void do_pending_operator(cmdarg_T *cap, int old_col, bool gui_yank)
|
||||
pos_T old_cursor;
|
||||
bool empty_region_error;
|
||||
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 */
|
||||
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;
|
||||
clearop(oap);
|
||||
}
|
||||
curwin->w_p_lbr = lbr_saved;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1205,8 +1205,13 @@ static void win_update(win_T *wp)
|
||||
*/
|
||||
if (VIsual_mode == Ctrl_V) {
|
||||
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);
|
||||
ve_flags = save_ve_flags;
|
||||
++toc;
|
||||
if (curwin->w_curswant == MAXCOL)
|
||||
toc = MAXCOL;
|
||||
|
@ -56,6 +56,14 @@ STARTTEST
|
||||
:syn match All /.*/ contains=ConcealVar
|
||||
:let line=ScreenChar(winwidth(0))
|
||||
: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
|
||||
:qa!
|
||||
ENDTEST
|
||||
|
@ -32,3 +32,7 @@ Sabbbbbb bla
|
||||
~
|
||||
~
|
||||
~
|
||||
this not
|
||||
aaaaaaaaaaaaa
|
||||
REMOVE:
|
||||
REMOVE:
|
||||
|
@ -199,7 +199,7 @@ static int included_patches[] = {
|
||||
//470,
|
||||
//469,
|
||||
//468,
|
||||
//467,
|
||||
467,
|
||||
//465,
|
||||
//464,
|
||||
//463,
|
||||
|
Loading…
Reference in New Issue
Block a user