mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
updated for version 7.4.425
Problem: When 'showbreak' is used "gj" may move to the wrong position. (Nazri Ramliy) Solution: Adjust virtcol when 'showbreak' is set. (Christian Brabandt)
This commit is contained in:
@@ -4509,13 +4509,19 @@ nv_screengo(oap, dir, dist)
|
|||||||
#if defined(FEAT_LINEBREAK) || defined(FEAT_MBYTE)
|
#if defined(FEAT_LINEBREAK) || defined(FEAT_MBYTE)
|
||||||
if (curwin->w_cursor.col > 0 && curwin->w_p_wrap)
|
if (curwin->w_cursor.col > 0 && curwin->w_p_wrap)
|
||||||
{
|
{
|
||||||
|
colnr_T virtcol;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Check for landing on a character that got split at the end of the
|
* Check for landing on a character that got split at the end of the
|
||||||
* last line. We want to advance a screenline, not end up in the same
|
* last line. We want to advance a screenline, not end up in the same
|
||||||
* screenline or move two screenlines.
|
* screenline or move two screenlines.
|
||||||
*/
|
*/
|
||||||
validate_virtcol();
|
validate_virtcol();
|
||||||
if (curwin->w_virtcol > curwin->w_curswant
|
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
|
||||||
|
@@ -741,6 +741,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
425,
|
||||||
/**/
|
/**/
|
||||||
424,
|
424,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user