mirror of
https://github.com/neovim/neovim.git
synced 2025-09-12 14:28:18 +00:00
Merge pull request #1516 from fmoralesc/new-patches
vim-patch:7.4.425,435,467,472,473,478
This commit is contained in:
@@ -1058,6 +1058,11 @@ int win_lbr_chartabsize(win_T *wp, char_u *line, char_u *s, colnr_T col, int *he
|
|||||||
if (col >= (colnr_T)wp->w_width) {
|
if (col >= (colnr_T)wp->w_width) {
|
||||||
col -= wp->w_width;
|
col -= wp->w_width;
|
||||||
numberextra = wp->w_width - (numberextra - win_col_off2(wp));
|
numberextra = wp->w_width - (numberextra - win_col_off2(wp));
|
||||||
|
if (*p_sbr != NUL) {
|
||||||
|
colnr_T sbrlen = (colnr_T)MB_CHARLEN(p_sbr);
|
||||||
|
if (col >= sbrlen)
|
||||||
|
col -= sbrlen;
|
||||||
|
}
|
||||||
if (numberextra > 0) {
|
if (numberextra > 0) {
|
||||||
col = col % numberextra;
|
col = col % numberextra;
|
||||||
}
|
}
|
||||||
|
@@ -5078,6 +5078,10 @@ internal_format (
|
|||||||
colnr_T leader_len;
|
colnr_T leader_len;
|
||||||
int no_leader = FALSE;
|
int no_leader = FALSE;
|
||||||
int do_comments = (flags & INSCHAR_DO_COM);
|
int do_comments = (flags & INSCHAR_DO_COM);
|
||||||
|
int has_lbr = curwin->w_p_lbr;
|
||||||
|
|
||||||
|
// make sure win_lbr_chartabsize() counts correctly
|
||||||
|
curwin->w_p_lbr = false;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* When 'ai' is off we don't want a space under the cursor to be
|
* When 'ai' is off we don't want a space under the cursor to be
|
||||||
@@ -5367,6 +5371,8 @@ internal_format (
|
|||||||
if (save_char != NUL) /* put back space after cursor */
|
if (save_char != NUL) /* put back space after cursor */
|
||||||
pchar_cursor(save_char);
|
pchar_cursor(save_char);
|
||||||
|
|
||||||
|
curwin->w_p_lbr = has_lbr;
|
||||||
|
|
||||||
if (!format_only && haveto_redraw) {
|
if (!format_only && haveto_redraw) {
|
||||||
update_topline();
|
update_topline();
|
||||||
redraw_curbuf_later(VALID);
|
redraw_curbuf_later(VALID);
|
||||||
|
@@ -1091,6 +1091,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 */
|
||||||
@@ -1703,6 +1707,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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -3484,7 +3489,11 @@ static bool nv_screengo(oparg_T *oap, int dir, long dist)
|
|||||||
* screenline or move two screenlines.
|
* screenline or move two screenlines.
|
||||||
*/
|
*/
|
||||||
validate_virtcol();
|
validate_virtcol();
|
||||||
if (curwin->w_virtcol > curwin->w_curswant
|
colnr_T virtcol = curwin->w_virtcol;
|
||||||
|
if (virtcol > (colnr_T)width1 && *p_sbr != NUL)
|
||||||
|
virtcol -= vim_strsize(p_sbr);
|
||||||
|
|
||||||
|
if (virtcol > curwin->w_curswant
|
||||||
&& (curwin->w_curswant < (colnr_T)width1
|
&& (curwin->w_curswant < (colnr_T)width1
|
||||||
? (curwin->w_curswant > (colnr_T)width1 / 2)
|
? (curwin->w_curswant > (colnr_T)width1 / 2)
|
||||||
: ((curwin->w_curswant - width1) % width2
|
: ((curwin->w_curswant - width1) % width2
|
||||||
|
@@ -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;
|
||||||
@@ -3725,6 +3730,7 @@ win_line (
|
|||||||
* special character (via 'listchars' option "precedes:<char>".
|
* special character (via 'listchars' option "precedes:<char>".
|
||||||
*/
|
*/
|
||||||
if (lcs_prec_todo != NUL
|
if (lcs_prec_todo != NUL
|
||||||
|
&& wp->w_p_list
|
||||||
&& (wp->w_p_wrap ? wp->w_skipcol > 0 : wp->w_leftcol > 0)
|
&& (wp->w_p_wrap ? wp->w_skipcol > 0 : wp->w_leftcol > 0)
|
||||||
&& filler_todo <= 0
|
&& filler_todo <= 0
|
||||||
&& draw_state > WL_NR
|
&& draw_state > WL_NR
|
||||||
|
@@ -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:
|
||||||
|
@@ -188,18 +188,18 @@ static int included_patches[] = {
|
|||||||
//481,
|
//481,
|
||||||
//480,
|
//480,
|
||||||
//479,
|
//479,
|
||||||
//478,
|
478,
|
||||||
//477,
|
//477,
|
||||||
//476,
|
//476,
|
||||||
//475,
|
//475,
|
||||||
//474,
|
//474,
|
||||||
//473,
|
473,
|
||||||
//472,
|
472,
|
||||||
//471,
|
//471,
|
||||||
//470,
|
//470,
|
||||||
//469,
|
//469,
|
||||||
//468,
|
//468,
|
||||||
//467,
|
467,
|
||||||
//465,
|
//465,
|
||||||
//464,
|
//464,
|
||||||
//463,
|
//463,
|
||||||
@@ -230,7 +230,7 @@ static int included_patches[] = {
|
|||||||
//438,
|
//438,
|
||||||
437,
|
437,
|
||||||
436,
|
436,
|
||||||
//435,
|
435,
|
||||||
//434,
|
//434,
|
||||||
433,
|
433,
|
||||||
//432 NA
|
//432 NA
|
||||||
@@ -240,7 +240,7 @@ static int included_patches[] = {
|
|||||||
//428 NA
|
//428 NA
|
||||||
427,
|
427,
|
||||||
//426 NA
|
//426 NA
|
||||||
//425,
|
425,
|
||||||
//424 NA
|
//424 NA
|
||||||
//423,
|
//423,
|
||||||
//422,
|
//422,
|
||||||
|
Reference in New Issue
Block a user