0
0
mirror of https://github.com/vim/vim.git synced 2025-09-28 04:24:06 -04:00

Add 'relativenumber' patch from Markus Heidelberg.

This commit is contained in:
Bram Moolenaar
2010-05-16 15:46:46 +02:00
parent 13c4c5da67
commit 64486671c3
22 changed files with 204 additions and 62 deletions

View File

@@ -7845,8 +7845,9 @@ nv_g_cmd(cap)
}
else
i = curwin->w_leftcol;
/* Go to the middle of the screen line. When 'number' is on and lines
* are wrapping the middle can be more to the left. */
/* Go to the middle of the screen line. When 'number' or
* 'relativenumber' is on and lines are wrapping the middle can be more
* to the left. */
if (cap->nchar == 'm')
i += (W_WIDTH(curwin) - curwin_col_off()
+ ((curwin->w_p_wrap && i > 0)