pos_T old_cursor;
int empty_region_error;
int restart_edit_save;
+#ifdef FEAT_LINEBREAK
+ int lbr_saved = curwin->w_p_lbr;
+
+ curwin->w_p_lbr = FALSE; /* avoid a problem with unwanted linebreaks in
+ * block mode */
+#endif
/* The visual area is remembered for redo */
static int redo_VIsual_mode = NUL; /* 'v', 'V', or Ctrl-V */
oap->block_mode = FALSE;
clearop(oap);
}
+#ifdef FEAT_LINEBREAK
+ curwin->w_p_lbr = lbr_saved;
+#endif
}
/*
*/
if (VIsual_mode == Ctrl_V)
{
- colnr_T fromc, toc;
+ colnr_T fromc, toc;
+#if defined(FEAT_VIRTUALEDIT) && defined(FEAT_LINEBREAK)
+ int save_ve_flags = ve_flags;
+ if (curwin->w_p_lbr)
+ ve_flags = VE_ALL;
+#endif
getvcols(wp, &VIsual, &curwin->w_cursor, &fromc, &toc);
+#if defined(FEAT_VIRTUALEDIT) && defined(FEAT_LINEBREAK)
+ ve_flags = save_ve_flags;
+#endif
++toc;
if (curwin->w_curswant == MAXCOL)
toc = MAXCOL;
STARTTEST
:so small.vim
-:if !exists("+linebreak") || !exists("+conceal") | e! test.ok | w! test.out | qa! | endif
+:if !exists("+linebreak") || !has("conceal") | e! test.ok | w! test.out | qa! | endif
:10new|:vsp|:vert resize 20
:put =\"\tabcdef hijklmn\tpqrstuvwxyz_1060ABCDEFGHIJKLMNOP \"
:norm! zt
: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:
+0\16jf x:$put
:%w! test.out
:qa!
ENDTEST
~
~
~
+this not
+aaaaaaaaaaaaa
+REMOVE:
+REMOVE:
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 467,
/**/
466,
/**/