summaryrefslogtreecommitdiff
path: root/src/normal.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2010-05-16 15:46:46 +0200
committerBram Moolenaar <Bram@vim.org>2010-05-16 15:46:46 +0200
commit64486671c3fcc75698c57732c50865ad0573b3fe (patch)
tree2e638c57e838549b6c314984b2405c25b2e4c175 /src/normal.c
parent13c4c5da673c488d2d340c72f401f0631b9f669d (diff)
downloadvim-git-64486671c3fcc75698c57732c50865ad0573b3fe.tar.gz
Add 'relativenumber' patch from Markus Heidelberg.
Diffstat (limited to 'src/normal.c')
-rw-r--r--src/normal.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/normal.c b/src/normal.c
index a19771b4f..e02c81781 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -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)