Index: runtime/doc/quickref.txt
===================================================================
*** runtime/doc/quickref.txt	(revision 908)
--- runtime/doc/quickref.txt	(working copy)
***************
*** 806,811 ****
--- 806,812 ----
  'pumheight'	  'ph'	    maximum height of the popup menu
  'quoteescape'	  'qe'	    escape characters used in a string
  'readonly'	  'ro'	    disallow writing the buffer
+ 'relativenumber'  'rnu'	    print relative line number in front of each line
  'remap'			    allow mappings to work recursively
  'report'		    threshold for reporting nr. of lines changed
  'restorescreen'   'rs'	    Win32: restore screen when exiting
Index: runtime/doc/version7.txt
===================================================================
*** runtime/doc/version7.txt	(revision 908)
--- runtime/doc/version7.txt	(working copy)
***************
*** 633,640 ****
  'maxmempattern'		maximum amount of memory to use for pattern matching
  'mkspellmem'		parameters for |:mkspell| memory use
  'mzquantum'		Time in msec to schedule MzScheme threads.
! 'numberwidth'		Minimal width of the space used for the 'number'
! 			option. (Emmanuel Renieris)
  'omnifunc'		The name of the function used for omni completion.
  'operatorfunc'		function to be called for |g@| operator
  'printmbcharset'	CJK character set to be used for :hardcopy
--- 633,640 ----
  'maxmempattern'		maximum amount of memory to use for pattern matching
  'mkspellmem'		parameters for |:mkspell| memory use
  'mzquantum'		Time in msec to schedule MzScheme threads.
! 'numberwidth'		Minimal width of the space used for the 'number' and
! 			'relativenumber' option. (Emmanuel Renieris)
  'omnifunc'		The name of the function used for omni completion.
  'operatorfunc'		function to be called for |g@| operator
  'printmbcharset'	CJK character set to be used for :hardcopy
Index: runtime/doc/options.txt
===================================================================
*** runtime/doc/options.txt	(revision 908)
--- runtime/doc/options.txt	(working copy)
***************
*** 1855,1862 ****
  			parenthesis match.  When included "%" ignores
  			backslashes, which is Vi compatible.
  								*cpo-n*
! 		n	When included, the column used for 'number' will also
! 			be used for text of wrapped lines.
  								*cpo-o*
  		o	Line offset to search command is not remembered for
  			next search.
--- 1855,1863 ----
  			parenthesis match.  When included "%" ignores
  			backslashes, which is Vi compatible.
  								*cpo-n*
! 		n	When included, the column used for 'number' and
! 			'relativenumber' will also be used for text of wrapped
! 			lines.
  								*cpo-o*
  		o	Line offset to search command is not remembered for
  			next search.
***************
*** 4807,4812 ****
--- 4808,4814 ----
  	When a long, wrapped line doesn't start with the first character, '-'
  	characters are put before the number.
  	See |hl-LineNr| for the highlighting used for the number.
+ 	When setting this option, 'relativenumber' is being reset.
  
  						*'numberwidth'* *'nuw'*
  'numberwidth' 'nuw'	number	(Vim default: 4  Vi default: 8)
***************
*** 4815,4827 ****
  			{only available when compiled with the |+linebreak|
  			feature}
  	Minimal number of columns to use for the line number.  Only relevant
! 	when the 'number' option is set or printing lines with a line number.
! 	Since one space is always between the number and the text, there is
! 	one less character for the number itself.
  	The value is the minimum width.  A bigger width is used when needed to
! 	fit the highest line number in the buffer.  Thus with the Vim default
! 	of 4 there is room for a line number up to 999.  When the buffer has
! 	1000 lines five columns will be used.
  	The minimum value is 1, the maximum value is 10.
  	NOTE: 'numberwidth' is reset to 8 when 'compatible' is set.
  
--- 4817,4831 ----
  			{only available when compiled with the |+linebreak|
  			feature}
  	Minimal number of columns to use for the line number.  Only relevant
! 	when the 'number' or 'relativenumber' option is set or printing lines
! 	with a line number.  Since one space is always between the number and
! 	the text, there is one less character for the number itself.
  	The value is the minimum width.  A bigger width is used when needed to
! 	fit the highest line number in the buffer respectively the number of
! 	rows in the window, depending on whether 'number' or 'relativenumber'
! 	is set.  Thus with the Vim default of 4 there is room for a line
! 	number up to 999.  When the buffer has 1000 lines five columns will be
! 	used.
  	The minimum value is 1, the maximum value is 10.
  	NOTE: 'numberwidth' is reset to 8 when 'compatible' is set.
  
***************
*** 5202,5207 ****
--- 5206,5226 ----
  	matches will be highlighted.  This is used to avoid that Vim hangs
  	when using a very complicated pattern.
  
+ 		*'relativenumber'* *'rnu'* *'norelativenumber'* *'nornu'*
+ 'relativenumber' 'rnu'	boolean	(default off)
+ 			local to window
+ 			{not in Vi}
+ 	Print the line number relative to the line with the cursor in front of
+ 	each line.  When the 'n' option is excluded from 'cpoptions' a wrapped
+ 	line will not use the column of line numbers (this is the default when
+ 	'compatible' isn't set).
+ 	The 'numberwidth' option can be used to set the room used for the line
+ 	number.
+ 	When a long, wrapped line doesn't start with the first character, '-'
+ 	characters are put before the number.
+ 	See |hl-LineNr| for the highlighting used for the number.
+ 	When setting this option, 'number' is being reset.
+ 
  						*'remap'* *'noremap'*
  'remap'			boolean	(default on)
  			global
Index: runtime/lang/menu_de_de.latin1.vim
===================================================================
*** runtime/lang/menu_de_de.latin1.vim	(revision 908)
--- runtime/lang/menu_de_de.latin1.vim	(working copy)
***************
*** 84,96 ****
  menutrans F&ile\ Settings				&Datei-Einstellungen
  
  " Boolean options
! menutrans Toggle\ Line\ &Numbering<Tab>:set\ nu!	Anzeige\ der\ Zeilen&nummer\ ein-\ und\ ausschalten<Tab>:set\ nu!
! menutrans Toggle\ &List\ Mode<Tab>:set\ list!		&List-Modus\ ein-\ und\ ausschalten<Tab>:set\ list!
! menutrans Toggle\ Line\ &Wrap<Tab>:set\ wrap!		&Zeilenumbruch\ ein-\ und\ ausschalten<Tab>:set\ wrap!
! menutrans Toggle\ W&rap\ at\ word<Tab>:set\ lbr!	Umbruch\ an\ &Wortgrenzen\ ein-\ und\ ausschalten<Tab>:set\ lbr!
! menutrans Toggle\ &expand-tab<Tab>:set\ et!		&Erweiterung\ von\ Tabulatoren\ ein-\ und\ ausschalten<Tab>:set\ et!
! menutrans Toggle\ &auto-indent<Tab>:set\ ai!		&Automatische\ Einrückung\ ein-\ und\ ausschalten<Tab>:set\ ai!
! menutrans Toggle\ &C-indenting<Tab>:set\ cin!		&C-Einrückung\ ein-\ und\ ausschalten<Tab>:set\ cin!
  
  " other options
  menutrans &Shiftwidth					&Schiebeweite
--- 84,97 ----
  menutrans F&ile\ Settings				&Datei-Einstellungen
  
  " Boolean options
! menutrans Toggle\ Line\ &Numbering<Tab>:set\ nu!		Anzeige\ der\ Zeilen&nummer\ ein-\ und\ ausschalten<Tab>:set\ nu!
! menutrans Toggle\ relati&ve\ Line\ Numbering<Tab>:set\ rnu!	Anzeige\ der\ relati&ven\ Zeilennummer\ ein-\ und\ ausschalten<Tab>:set\ rnu!
! menutrans Toggle\ &List\ Mode<Tab>:set\ list!			&List-Modus\ ein-\ und\ ausschalten<Tab>:set\ list!
! menutrans Toggle\ Line\ &Wrap<Tab>:set\ wrap!			&Zeilenumbruch\ ein-\ und\ ausschalten<Tab>:set\ wrap!
! menutrans Toggle\ W&rap\ at\ word<Tab>:set\ lbr!		Umbruch\ an\ &Wortgrenzen\ ein-\ und\ ausschalten<Tab>:set\ lbr!
! menutrans Toggle\ &expand-tab<Tab>:set\ et!			&Erweiterung\ von\ Tabulatoren\ ein-\ und\ ausschalten<Tab>:set\ et!
! menutrans Toggle\ &auto-indent<Tab>:set\ ai!			&Automatische\ Einrückung\ ein-\ und\ ausschalten<Tab>:set\ ai!
! menutrans Toggle\ &C-indenting<Tab>:set\ cin!			&C-Einrückung\ ein-\ und\ ausschalten<Tab>:set\ cin!
  
  " other options
  menutrans &Shiftwidth					&Schiebeweite
Index: runtime/syntax/vim.vim
===================================================================
*** runtime/syntax/vim.vim	(revision 908)
--- runtime/syntax/vim.vim	(working copy)
***************
*** 20,26 ****
  syn match   vimCommand contained	"\<z[-+^.=]"
  
  " vimOptions are caught only when contained in a vimSet {{{2
! syn keyword vimOption contained	acd ai akm al aleph allowrevins altkeymap ambiwidth ambw anti antialias ar arab arabic arabicshape ari arshape autochdir autoindent autoread autowrite autowriteall aw awa background backspace backup backupcopy backupdir backupext backupskip balloondelay ballooneval balloonexpr bdir bdlay beval bex bexpr bg bh bin binary biosk bioskey bk bkc bl bomb breakat brk browsedir bs bsdir bsk bt bufhidden buflisted buftype casemap cb ccv cd cdpath cedit cf cfu ch charconvert ci cin cindent cink cinkeys cino cinoptions cinw cinwords clipboard cmdheight cmdwinheight cmp cms co columns com comments commentstring compatible complete completefunc completeopt confirm consk conskey copyindent cot cp cpo cpoptions cpt cscopepathcomp cscopeprg cscopequickfix cscopetag cscopetagorder cscopeverbose cspc csprg csqf cst csto csverb cuc cul cursorcolumn cursorline cwh debug deco def define delcombine dex dg dict dictionary diff diffexpr diffopt digraph dip dir directory display dy ea ead eadirection eb ed edcompatible ef efm ei ek enc encoding endofline eol ep equalalways equalprg errorbells errorfile errorformat esckeys et eventignore ex expandtab exrc fcl fcs fdc fde fdi fdl fdls fdm fdn fdo fdt fen fenc fencs fex ff ffs fileencoding fileencodings fileformat fileformats filetype fillchars fk fkmap flp fml fmr fo foldclose foldcolumn foldenable foldexpr foldignore foldlevel foldlevelstart foldmarker foldmethod foldminlines foldnestmax foldopen foldtext formatexpr formatlistpat formatoptions formatprg fp fs fsync ft gcr gd gdefault gfm gfn gfs gfw ghr go gp grepformat grepprg gtl gtt guicursor guifont guifontset guifontwide guiheadroom guioptions guipty guitablabel guitabtooltip helpfile helpheight helplang hf hh hi hid hidden highlight history hk hkmap hkmapp hkp hl hlg hls hlsearch ic icon iconstring ignorecase im imactivatekey imak imc imcmdline imd imdisable imi iminsert ims imsearch inc include includeexpr incsearch inde indentexpr indentkeys indk inex inf infercase insertmode is isf isfname isi isident isk iskeyword isp isprint joinspaces js key keymap keymodel keywordprg km kmp kp langmap langmenu laststatus lazyredraw lbr lcs linebreak lines linespace lisp lispwords list listchars lm lmap loadplugins lpl ls lsp lw lz ma macatsui magic makeef makeprg mat matchpairs matchtime maxcombine maxfuncdepth maxmapdepth maxmem maxmempattern maxmemtot mco mef menuitems mfd mh mis mkspellmem ml mls mm mmd mmp mmt mod modeline modelines modifiable modified more mouse mousef mousefocus mousehide mousem mousemodel mouses mouseshape mouset mousetime mp mps msm mzq mzquantum nf nrformats nu number numberwidth nuw odev oft ofu omnifunc opendevice operatorfunc opfunc osfiletype pa para paragraphs paste pastetoggle patchexpr patchmode path pdev penc pex pexpr pfn ph pheader pi pm pmbcs pmbfn popt preserveindent previewheight previewwindow printdevice printencoding printexpr printfont printheader printmbcharset printmbfont printoptions prompt pt pumheight pvh pvw qe quoteescape readonly remap report restorescreen revins ri rightleft rightleftcmd rl rlc ro rs rtp ru ruf ruler rulerformat runtimepath sb sbo sbr sc scb scr scroll scrollbind scrolljump scrolloff scrollopt scs sect sections secure sel selection selectmode sessionoptions sft sh shcf shell shellcmdflag shellpipe shellquote shellredir shellslash shelltemp shelltype shellxquote shiftround shiftwidth shm shortmess shortname showbreak showcmd showfulltag showmatch showmode showtabline shq si sidescroll sidescrolloff siso sj slm sm smartcase smartindent smarttab smc smd sn so softtabstop sol sp spc spell spellcapcheck spellfile spelllang spellsuggest spf spl splitbelow splitright spr sps sr srr ss ssl ssop st sta stal startofline statusline stl stmp sts su sua suffixes suffixesadd sw swapfile swapsync swb swf switchbuf sws sxq syn synmaxcol syntax ta tabline tabpagemax tabstop tag tagbsearch taglength tagrelative tags tagstack tal tb tbi tbidi tbis tbs tenc term termbidi termencoding terse textauto textmode textwidth tf tgst thesaurus tildeop timeout timeoutlen title titlelen titleold titlestring tl tm to toolbar toolbariconsize top tpm tr ts tsl tsr ttimeout ttimeoutlen ttm tty ttybuiltin ttyfast ttym ttymouse ttyscroll ttytype tw tx uc ul undolevels updatecount updatetime ut vb vbs vdir ve verbose verbosefile vfile vi viewdir viewoptions viminfo virtualedit visualbell vop wa wak warn wb wc wcm wd weirdinvert wfh wfw wh whichwrap wi wig wildchar wildcharm wildignore wildmenu wildmode wildoptions wim winaltkeys window winfixheight winfixwidth winheight winminheight winminwidth winwidth wiv wiw wm wmh wmnu wmw wop wrap wrapmargin wrapscan write writeany writebackup writedelay ws ww 
  
  " vimOptions: These are the turn-off setting variants {{{2
  syn keyword vimOption contained	noacd noai noakm noallowrevins noaltkeymap noanti noantialias noar noarab noarabic noarabicshape noari noarshape noautochdir noautoindent noautoread noautowrite noautowriteall noaw noawa nobackup noballooneval nobeval nobin nobinary nobiosk nobioskey nobk nobl nobomb nobuflisted nocf noci nocin nocindent nocompatible noconfirm noconsk noconskey nocopyindent nocp nocscopetag nocscopeverbose nocst nocsverb nocuc nocul nocursorcolumn nocursorline nodeco nodelcombine nodg nodiff nodigraph nodisable noea noeb noed noedcompatible noek noendofline noeol noequalalways noerrorbells noesckeys noet noex noexpandtab noexrc nofen nofk nofkmap nofoldenable nogd nogdefault noguipty nohid nohidden nohk nohkmap nohkmapp nohkp nohls nohlsearch noic noicon noignorecase noim noimc noimcmdline noimd noincsearch noinf noinfercase noinsertmode nois nojoinspaces nojs nolazyredraw nolbr nolinebreak nolisp nolist noloadplugins nolpl nolz noma nomacatsui nomagic nomh noml nomod nomodeline nomodifiable nomodified nomore nomousef nomousefocus nomousehide nonu nonumber noodev noopendevice nopaste nopi nopreserveindent nopreviewwindow noprompt nopvw noreadonly noremap norestorescreen norevins nori norightleft norightleftcmd norl norlc noro nors noru noruler nosb nosc noscb noscrollbind noscs nosecure nosft noshellslash noshelltemp noshiftround noshortname noshowcmd noshowfulltag noshowmatch noshowmode nosi nosm nosmartcase nosmartindent nosmarttab nosmd nosn nosol nospell nosplitbelow nosplitright nospr nosr nossl nosta nostartofline nostmp noswapfile noswf nota notagbsearch notagrelative notagstack notbi notbidi notbs notermbidi noterse notextauto notextmode notf notgst notildeop notimeout notitle noto notop notr nottimeout nottybuiltin nottyfast notx novb novisualbell nowa nowarn nowb noweirdinvert nowfh nowfw nowildmenu nowinfixheight nowinfixwidth nowiv nowmnu nowrap nowrapscan nowrite nowriteany nowritebackup nows 
--- 20,26 ----
  syn match   vimCommand contained	"\<z[-+^.=]"
  
  " vimOptions are caught only when contained in a vimSet {{{2
! syn keyword vimOption contained	acd ai akm al aleph allowrevins altkeymap ambiwidth ambw anti antialias ar arab arabic arabicshape ari arshape autochdir autoindent autoread autowrite autowriteall aw awa background backspace backup backupcopy backupdir backupext backupskip balloondelay ballooneval balloonexpr bdir bdlay beval bex bexpr bg bh bin binary biosk bioskey bk bkc bl bomb breakat brk browsedir bs bsdir bsk bt bufhidden buflisted buftype casemap cb ccv cd cdpath cedit cf cfu ch charconvert ci cin cindent cink cinkeys cino cinoptions cinw cinwords clipboard cmdheight cmdwinheight cmp cms co columns com comments commentstring compatible complete completefunc completeopt confirm consk conskey copyindent cot cp cpo cpoptions cpt cscopepathcomp cscopeprg cscopequickfix cscopetag cscopetagorder cscopeverbose cspc csprg csqf cst csto csverb cuc cul cursorcolumn cursorline cwh debug deco def define delcombine dex dg dict dictionary diff diffexpr diffopt digraph dip dir directory display dy ea ead eadirection eb ed edcompatible ef efm ei ek enc encoding endofline eol ep equalalways equalprg errorbells errorfile errorformat esckeys et eventignore ex expandtab exrc fcl fcs fdc fde fdi fdl fdls fdm fdn fdo fdt fen fenc fencs fex ff ffs fileencoding fileencodings fileformat fileformats filetype fillchars fk fkmap flp fml fmr fo foldclose foldcolumn foldenable foldexpr foldignore foldlevel foldlevelstart foldmarker foldmethod foldminlines foldnestmax foldopen foldtext formatexpr formatlistpat formatoptions formatprg fp fs fsync ft gcr gd gdefault gfm gfn gfs gfw ghr go gp grepformat grepprg gtl gtt guicursor guifont guifontset guifontwide guiheadroom guioptions guipty guitablabel guitabtooltip helpfile helpheight helplang hf hh hi hid hidden highlight history hk hkmap hkmapp hkp hl hlg hls hlsearch ic icon iconstring ignorecase im imactivatekey imak imc imcmdline imd imdisable imi iminsert ims imsearch inc include includeexpr incsearch inde indentexpr indentkeys indk inex inf infercase insertmode is isf isfname isi isident isk iskeyword isp isprint joinspaces js key keymap keymodel keywordprg km kmp kp langmap langmenu laststatus lazyredraw lbr lcs linebreak lines linespace lisp lispwords list listchars lm lmap loadplugins lpl ls lsp lw lz ma macatsui magic makeef makeprg mat matchpairs matchtime maxcombine maxfuncdepth maxmapdepth maxmem maxmempattern maxmemtot mco mef menuitems mfd mh mis mkspellmem ml mls mm mmd mmp mmt mod modeline modelines modifiable modified more mouse mousef mousefocus mousehide mousem mousemodel mouses mouseshape mouset mousetime mp mps msm mzq mzquantum nf nrformats nu number numberwidth nuw odev oft ofu omnifunc opendevice operatorfunc opfunc osfiletype pa para paragraphs paste pastetoggle patchexpr patchmode path pdev penc pex pexpr pfn ph pheader pi pm pmbcs pmbfn popt preserveindent previewheight previewwindow printdevice printencoding printexpr printfont printheader printmbcharset printmbfont printoptions prompt pt pumheight pvh pvw qe quoteescape readonly relativenumber remap report restorescreen revins ri rightleft rightleftcmd rl rlc rnu ro rs rtp ru ruf ruler rulerformat runtimepath sb sbo sbr sc scb scr scroll scrollbind scrolljump scrolloff scrollopt scs sect sections secure sel selection selectmode sessionoptions sft sh shcf shell shellcmdflag shellpipe shellquote shellredir shellslash shelltemp shelltype shellxquote shiftround shiftwidth shm shortmess shortname showbreak showcmd showfulltag showmatch showmode showtabline shq si sidescroll sidescrolloff siso sj slm sm smartcase smartindent smarttab smc smd sn so softtabstop sol sp spc spell spellcapcheck spellfile spelllang spellsuggest spf spl splitbelow splitright spr sps sr srr ss ssl ssop st sta stal startofline statusline stl stmp sts su sua suffixes suffixesadd sw swapfile swapsync swb swf switchbuf sws sxq syn synmaxcol syntax ta tabline tabpagemax tabstop tag tagbsearch taglength tagrelative tags tagstack tal tb tbi tbidi tbis tbs tenc term termbidi termencoding terse textauto textmode textwidth tf tgst thesaurus tildeop timeout timeoutlen title titlelen titleold titlestring tl tm to toolbar toolbariconsize top tpm tr ts tsl tsr ttimeout ttimeoutlen ttm tty ttybuiltin ttyfast ttym ttymouse ttyscroll ttytype tw tx uc ul undolevels updatecount updatetime ut vb vbs vdir ve verbose verbosefile vfile vi viewdir viewoptions viminfo virtualedit visualbell vop wa wak warn wb wc wcm wd weirdinvert wfh wfw wh whichwrap wi wig wildchar wildcharm wildignore wildmenu wildmode wildoptions wim winaltkeys window winfixheight winfixwidth winheight winminheight winminwidth winwidth wiv wiw wm wmh wmnu wmw wop wrap wrapmargin wrapscan write writeany writebackup writedelay ws ww 
  
  " vimOptions: These are the turn-off setting variants {{{2
  syn keyword vimOption contained	noacd noai noakm noallowrevins noaltkeymap noanti noantialias noar noarab noarabic noarabicshape noari noarshape noautochdir noautoindent noautoread noautowrite noautowriteall noaw noawa nobackup noballooneval nobeval nobin nobinary nobiosk nobioskey nobk nobl nobomb nobuflisted nocf noci nocin nocindent nocompatible noconfirm noconsk noconskey nocopyindent nocp nocscopetag nocscopeverbose nocst nocsverb nocuc nocul nocursorcolumn nocursorline nodeco nodelcombine nodg nodiff nodigraph nodisable noea noeb noed noedcompatible noek noendofline noeol noequalalways noerrorbells noesckeys noet noex noexpandtab noexrc nofen nofk nofkmap nofoldenable nogd nogdefault noguipty nohid nohidden nohk nohkmap nohkmapp nohkp nohls nohlsearch noic noicon noignorecase noim noimc noimcmdline noimd noincsearch noinf noinfercase noinsertmode nois nojoinspaces nojs nolazyredraw nolbr nolinebreak nolisp nolist noloadplugins nolpl nolz noma nomacatsui nomagic nomh noml nomod nomodeline nomodifiable nomodified nomore nomousef nomousefocus nomousehide nonu nonumber noodev noopendevice nopaste nopi nopreserveindent nopreviewwindow noprompt nopvw noreadonly noremap norestorescreen norevins nori norightleft norightleftcmd norl norlc noro nors noru noruler nosb nosc noscb noscrollbind noscs nosecure nosft noshellslash noshelltemp noshiftround noshortname noshowcmd noshowfulltag noshowmatch noshowmode nosi nosm nosmartcase nosmartindent nosmarttab nosmd nosn nosol nospell nosplitbelow nosplitright nospr nosr nossl nosta nostartofline nostmp noswapfile noswf nota notagbsearch notagrelative notagstack notbi notbidi notbs notermbidi noterse notextauto notextmode notf notgst notildeop notimeout notitle noto notop notr nottimeout nottybuiltin nottyfast notx novb novisualbell nowa nowarn nowb noweirdinvert nowfh nowfw nowildmenu nowinfixheight nowinfixwidth nowiv nowmnu nowrap nowrapscan nowrite nowriteany nowritebackup nows 
Index: runtime/menu.vim
===================================================================
*** runtime/menu.vim	(revision 908)
--- runtime/menu.vim	(working copy)
***************
*** 269,274 ****
--- 269,275 ----
  
  " Boolean options
  an 20.440.100 &Edit.F&ile\ Settings.Toggle\ Line\ &Numbering<Tab>:set\ nu!	:set nu! nu?<CR>
+ an 20.440.105 &Edit.F&ile\ Settings.Toggle\ relati&ve\ Line\ Numbering<Tab>:set\ rnu!	:set rnu! rnu?<CR>
  an 20.440.110 &Edit.F&ile\ Settings.Toggle\ &List\ Mode<Tab>:set\ list!	:set list! list?<CR>
  an 20.440.120 &Edit.F&ile\ Settings.Toggle\ Line\ &Wrap<Tab>:set\ wrap!	:set wrap! wrap?<CR>
  an 20.440.130 &Edit.F&ile\ Settings.Toggle\ W&rap\ at\ word<Tab>:set\ lbr!	:set lbr! lbr?<CR>
Index: runtime/optwin.vim
===================================================================
*** runtime/optwin.vim	(revision 908)
--- runtime/optwin.vim	(working copy)
***************
*** 361,366 ****
--- 361,369 ----
  call append("$", "number\tshow the line number for each line")
  call append("$", "\t(local to window)")
  call <SID>BinOptionL("nu")
+ call append("$", "relativenumber\tshow the relative line number for each line")
+ call append("$", "\t(local to window)")
+ call <SID>BinOptionL("rnu")
  if has("linebreak")
    call append("$", "numberwidth\tnumber of columns to use for the line number")
    call append("$", "\t(local to window)")
Index: src/proto/misc2.pro
===================================================================
*** src/proto/misc2.pro	(revision 908)
--- src/proto/misc2.pro	(working copy)
***************
*** 2,7 ****
--- 2,8 ----
  int virtual_active __ARGS((void));
  int getviscol __ARGS((void));
  int getviscol2 __ARGS((colnr_T col, colnr_T coladd));
+ linenr_T get_cursor_rel_lnum __ARGS((win_T *wp, linenr_T lnum));
  int coladvance_force __ARGS((colnr_T wcol));
  int coladvance __ARGS((colnr_T wcol));
  int getvpos __ARGS((pos_T *pos, colnr_T wcol));
***************
*** 82,95 ****
  int update_keys __ARGS((int c));
  void crypt_init_keys __ARGS((char_u *passwd));
  char_u *get_crypt_key __ARGS((int store, int twice));
! void *vim_findfile_init __ARGS((char_u *path, char_u *filename, char_u *stopdirs, int level, int free_visited, int need_dir, void *search_ctx, int tagfile, char_u *rel_fname));
  char_u *vim_findfile_stopdir __ARGS((char_u *buf));
  void vim_findfile_cleanup __ARGS((void *ctx));
! char_u *vim_findfile __ARGS((void *search_ctx));
! void vim_findfile_free_visited __ARGS((void *search_ctx));
  char_u *find_file_in_path __ARGS((char_u *ptr, int len, int options, int first, char_u *rel_fname));
  char_u *find_directory_in_path __ARGS((char_u *ptr, int len, int options, char_u *rel_fname));
! char_u *find_file_in_path_option __ARGS((char_u *ptr, int len, int options, int first, char_u *path_option, int need_dir, char_u *rel_fname, char_u *suffixes));
  int vim_chdir __ARGS((char_u *new_dir));
  int get_user_name __ARGS((char_u *buf, int len));
  void sort_strings __ARGS((char_u **files, int count));
--- 83,96 ----
  int update_keys __ARGS((int c));
  void crypt_init_keys __ARGS((char_u *passwd));
  char_u *get_crypt_key __ARGS((int store, int twice));
! void *vim_findfile_init __ARGS((char_u *path, char_u *filename, char_u *stopdirs, int level, int free_visited, int find_what, void *search_ctx_arg, int tagfile, char_u *rel_fname));
  char_u *vim_findfile_stopdir __ARGS((char_u *buf));
  void vim_findfile_cleanup __ARGS((void *ctx));
! char_u *vim_findfile __ARGS((void *search_ctx_arg));
! void vim_findfile_free_visited __ARGS((void *search_ctx_arg));
  char_u *find_file_in_path __ARGS((char_u *ptr, int len, int options, int first, char_u *rel_fname));
  char_u *find_directory_in_path __ARGS((char_u *ptr, int len, int options, char_u *rel_fname));
! char_u *find_file_in_path_option __ARGS((char_u *ptr, int len, int options, int first, char_u *path_option, int find_what, char_u *rel_fname, char_u *suffixes));
  int vim_chdir __ARGS((char_u *new_dir));
  int get_user_name __ARGS((char_u *buf, int len));
  void sort_strings __ARGS((char_u **files, int count));
Index: src/edit.c
===================================================================
*** src/edit.c	(revision 908)
--- src/edit.c	(working copy)
***************
*** 6165,6171 ****
  		    )
  	    textwidth -= 1;
  #endif
! 	if (curwin->w_p_nu)
  	    textwidth -= 8;
      }
      if (textwidth < 0)
--- 6165,6171 ----
  		    )
  	    textwidth -= 1;
  #endif
! 	if (curwin->w_p_nu || curwin->w_p_rnu)
  	    textwidth -= 8;
      }
      if (textwidth < 0)
Index: src/ex_cmds.c
===================================================================
*** src/ex_cmds.c	(revision 908)
--- src/ex_cmds.c	(working copy)
***************
*** 3462,3467 ****
--- 3462,3468 ----
  	curbuf->b_p_ma = FALSE;		/* not modifiable */
  	curbuf->b_p_bin = FALSE;	/* reset 'bin' before reading file */
  	curwin->w_p_nu = 0;		/* no line numbers */
+ 	curwin->w_p_rnu = 0;		/* no relative line numbers */
  #ifdef FEAT_SCROLLBIND
  	curwin->w_p_scb = FALSE;	/* no scroll binding */
  #endif
Index: src/gui.c
===================================================================
*** src/gui.c	(revision 908)
--- src/gui.c	(working copy)
***************
*** 4355,4361 ****
  	max += W_WIDTH(curwin) - 1;
  #endif
  	/* The line number isn't scrolled, thus there is less space when
! 	 * 'number' is set (also for 'foldcolumn'). */
  	size -= curwin_col_off();
  #ifndef SCROLL_PAST_END
  	max -= curwin_col_off();
--- 4355,4361 ----
  	max += W_WIDTH(curwin) - 1;
  #endif
  	/* The line number isn't scrolled, thus there is less space when
! 	 * 'number' or 'relativenumber' is set (also for 'foldcolumn'). */
  	size -= curwin_col_off();
  #ifndef SCROLL_PAST_END
  	max -= curwin_col_off();
Index: src/misc1.c
===================================================================
*** src/misc1.c	(revision 908)
--- src/misc1.c	(working copy)
***************
*** 1744,1750 ****
  	col += 1;
  
      /*
!      * Add column offset for 'number' and 'foldcolumn'.
       */
      width = W_WIDTH(wp) - win_col_off(wp);
      if (width <= 0)
--- 1744,1750 ----
  	col += 1;
  
      /*
!      * Add column offset for 'number', 'relativenumber' and 'foldcolumn'.
       */
      width = W_WIDTH(wp) - win_col_off(wp);
      if (width <= 0)
***************
*** 1805,1811 ****
  	col += win_lbr_chartabsize(wp, s, (colnr_T)col, NULL) - 1;
  
      /*
!      * Add column offset for 'number', 'foldcolumn', etc.
       */
      width = W_WIDTH(wp) - win_col_off(wp);
      if (width <= 0)
--- 1805,1811 ----
  	col += win_lbr_chartabsize(wp, s, (colnr_T)col, NULL) - 1;
  
      /*
!      * Add column offset for 'number', 'relativenumber', 'foldcolumn', etc.
       */
      width = W_WIDTH(wp) - win_col_off(wp);
      if (width <= 0)
Index: src/misc2.c
===================================================================
*** src/misc2.c	(revision 908)
--- src/misc2.c	(working copy)
***************
*** 72,77 ****
--- 72,127 ----
  }
  
  /*
+  * Get the line number relative to the actual cursor position, i.e. the
+  * difference between line number and cursor position
+  */
+     linenr_T
+ get_cursor_rel_lnum(wp, lnum)
+     win_T	*wp;
+     linenr_T	lnum;		    /* line number to get the result for */
+ {
+     linenr_T	cursor = wp->w_cursor.lnum;
+     linenr_T	retval = 0;
+ 
+ #ifdef FEAT_FOLDING
+     if (hasAnyFolding(wp))
+     {
+ 	if (lnum > cursor)
+ 	{
+ 	    while (lnum > cursor)
+ 	    {
+ 		(void)hasFolding(lnum, &lnum, NULL);
+ 		/* if lnum and cursor are in the same fold,
+ 		 * now lnum <= cursor */
+ 		if (lnum > cursor)
+ 		    retval ++;
+ 		lnum --;
+ 	    }
+ 	}
+ 	else if (lnum < cursor)
+ 	{
+ 	    while (lnum < cursor)
+ 	    {
+ 		(void)hasFolding(lnum, NULL, &lnum);
+ 		/* if lnum and cursor are in the same fold,
+ 		 * now lnum >= cursor */
+ 		if (lnum < cursor)
+ 		    retval --;
+ 		lnum ++;
+ 	    }
+ 	}
+ 	/* else if (lnum == cursor)
+ 	 *     retval = 0;
+ 	 */
+     }
+     else
+ #endif
+ 	retval = lnum - cursor;
+ 
+     return retval;
+ }
+ 
+ /*
   * Go to column "wcol", and add/insert white space as necessary to get the
   * cursor in that column.
   * The caller must have saved the cursor line for undo!
Index: src/move.c
===================================================================
*** src/move.c	(revision 908)
--- src/move.c	(working copy)
***************
*** 904,917 ****
  }
  
  /*
!  * Compute offset of a window, occupied by line number, fold column and sign
!  * column (these don't move when scrolling horizontally).
   */
      int
  win_col_off(wp)
      win_T	*wp;
  {
!     return ((wp->w_p_nu ? number_width(wp) + 1 : 0)
  #ifdef FEAT_CMDWIN
  	    + (cmdwin_type == 0 || wp != curwin ? 0 : 1)
  #endif
--- 904,917 ----
  }
  
  /*
!  * Compute offset of a window, occupied by absolute or relative line number,
!  * fold column and sign column (these don't move when scrolling horizontally).
   */
      int
  win_col_off(wp)
      win_T	*wp;
  {
!     return (((wp->w_p_nu || wp->w_p_rnu) ? number_width(wp) + 1 : 0)
  #ifdef FEAT_CMDWIN
  	    + (cmdwin_type == 0 || wp != curwin ? 0 : 1)
  #endif
***************
*** 937,949 ****
  
  /*
   * Return the difference in column offset for the second screen line of a
!  * wrapped line.  It's 8 if 'number' is on and 'n' is in 'cpoptions'.
   */
      int
  win_col_off2(wp)
      win_T	*wp;
  {
!     if (wp->w_p_nu && vim_strchr(p_cpo, CPO_NUMCOL) != NULL)
  	return number_width(wp) + 1;
      return 0;
  }
--- 937,950 ----
  
  /*
   * Return the difference in column offset for the second screen line of a
!  * wrapped line.  It's 8 if 'number' or 'relativenumber' is on and 'n' is in
!  * 'cpoptions'.
   */
      int
  win_col_off2(wp)
      win_T	*wp;
  {
!     if ((wp->w_p_nu || wp->w_p_rnu) && vim_strchr(p_cpo, CPO_NUMCOL) != NULL)
  	return number_width(wp) + 1;
      return 0;
  }
***************
*** 1205,1221 ****
      if (prev_skipcol != curwin->w_skipcol)
  	redraw_later(NOT_VALID);
  
  #ifdef FEAT_SYN_HL
!     /* Redraw when w_virtcol changes and 'cursorcolumn' is set, or when w_row
!      * changes and 'cursorline' is set. */
!     if (((curwin->w_p_cuc && (curwin->w_valid & VALID_VIRTCOL) == 0)
! 		|| (curwin->w_p_cul && (curwin->w_valid & VALID_WROW) == 0))
  # ifdef FEAT_INS_EXPAND
! 	    && !pum_visible()
  # endif
! 	    )
! 	redraw_later(SOME_VALID);
! #endif
  
      curwin->w_valid |= VALID_WCOL|VALID_WROW|VALID_VIRTCOL;
  }
--- 1206,1227 ----
      if (prev_skipcol != curwin->w_skipcol)
  	redraw_later(NOT_VALID);
  
+     /* Redraw when w_row changes and 'relativenumber' is set */
+     if (((curwin->w_valid & VALID_WROW) == 0 && (curwin->w_p_rnu
  #ifdef FEAT_SYN_HL
! 	/* or when w_row changes and 'cursorline' is set. */
! 						|| curwin->w_p_cul
! #endif
! 	))
! #ifdef FEAT_SYN_HL
! 	/* or when w_virtcol changes and 'cursorcolumn' is set */
! 	|| (curwin->w_p_cuc && (curwin->w_valid & VALID_VIRTCOL) == 0)
! #endif
! 	)
  # ifdef FEAT_INS_EXPAND
! 	    if (!pum_visible())
  # endif
! 		redraw_later(SOME_VALID);
  
      curwin->w_valid |= VALID_WCOL|VALID_WROW|VALID_VIRTCOL;
  }
Index: src/netbeans.c
===================================================================
*** src/netbeans.c	(revision 908)
--- src/netbeans.c	(working copy)
***************
*** 3032,3038 ****
  
      if (bufno >= 0 && curwin != NULL && curwin->w_buffer == curbuf)
      {
! 	int col = mouse_col - W_WINCOL(curwin) - (curwin->w_p_nu ? 9 : 1);
  	long off = pos2off(curbuf, &curwin->w_cursor);
  
  	/* sync the cursor position */
--- 3032,3039 ----
  
      if (bufno >= 0 && curwin != NULL && curwin->w_buffer == curbuf)
      {
! 	int col = mouse_col - W_WINCOL(curwin)
! 		  - ((curwin->w_p_nu || curwin->w_p_rnu) ? 9 : 1);
  	long off = pos2off(curbuf, &curwin->w_cursor);
  
  	/* sync the cursor position */
Index: src/normal.c
===================================================================
*** src/normal.c	(revision 908)
--- src/normal.c	(working copy)
***************
*** 7748,7755 ****
  	}
  	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.*/
  	if (cap->nchar == 'm')
  	    i += (W_WIDTH(curwin) - curwin_col_off()
  		    + ((curwin->w_p_wrap && i > 0)
--- 7748,7756 ----
  	}
  	else
  	    i = curwin->w_leftcol;
! 	/* 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)
Index: src/option.c
===================================================================
*** src/option.c	(revision 908)
--- src/option.c	(working copy)
***************
*** 207,212 ****
--- 207,213 ----
  # define PV_LBR		OPT_WIN(WV_LBR)
  #endif
  #define PV_NU		OPT_WIN(WV_NU)
+ #define PV_RNU		OPT_WIN(WV_RNU)
  #ifdef FEAT_LINEBREAK
  # define PV_NUW		OPT_WIN(WV_NUW)
  #endif
***************
*** 1998,2003 ****
--- 1999,2007 ----
  			    (char_u *)NULL, PV_NONE,
  #endif
  			    {(char_u *)2000L, (char_u *)0L}},
+     {"relativenumber", "rnu", P_BOOL|P_VI_DEF|P_RWIN,
+ 			    (char_u *)VAR_WIN, PV_RNU,
+ 			    {(char_u *)FALSE, (char_u *)0L}},
      {"remap",	    NULL,   P_BOOL|P_VI_DEF,
  			    (char_u *)&p_remap, PV_NONE,
  			    {(char_u *)TRUE, (char_u *)0L}},
***************
*** 7331,7336 ****
--- 7335,7353 ----
  	    curwin->w_leftcol = 0;
      }
  
+     /* If 'number' is set, reset 'relativenumber'. */
+     else if ((int *)varp == &curwin->w_p_nu)
+     {
+ 	if (curwin->w_p_nu)
+ 	    curwin->w_p_rnu = FALSE;
+     }
+     /* If 'relativenumber' is set, reset 'number'. */
+     else if ((int *)varp == &curwin->w_p_rnu)
+     {
+ 	if (curwin->w_p_rnu)
+ 	    curwin->w_p_nu = FALSE;
+     }
+ 
  #ifdef FEAT_WINDOWS
      else if ((int *)varp == &p_ea)
      {
***************
*** 9039,9044 ****
--- 9056,9062 ----
  	case PV_FMR:	return (char_u *)&(curwin->w_p_fmr);
  #endif
  	case PV_NU:	return (char_u *)&(curwin->w_p_nu);
+ 	case PV_RNU:	return (char_u *)&(curwin->w_p_rnu);
  #ifdef FEAT_LINEBREAK
  	case PV_NUW:	return (char_u *)&(curwin->w_p_nuw);
  #endif
***************
*** 9224,9229 ****
--- 9242,9248 ----
  #endif
      to->wo_list = from->wo_list;
      to->wo_nu = from->wo_nu;
+     to->wo_rnu = from->wo_rnu;
  #ifdef FEAT_LINEBREAK
      to->wo_nuw = from->wo_nuw;
  #endif
Index: src/option.h
===================================================================
*** src/option.h	(revision 908)
--- src/option.h	(working copy)
***************
*** 1031,1036 ****
--- 1031,1037 ----
      , WV_LBR
  #endif
      , WV_NU
+     , WV_RNU
  #ifdef FEAT_LINEBREAK
      , WV_NUW
  #endif
Index: src/screen.c
===================================================================
*** src/screen.c	(revision 908)
--- src/screen.c	(working copy)
***************
*** 420,428 ****
  	check_for_delay(FALSE);
  
  #ifdef FEAT_LINEBREAK
!     /* Force redraw when width of 'number' column changes. */
      if (curwin->w_redr_type < NOT_VALID
! 	   && curwin->w_nrwidth != (curwin->w_p_nu ? number_width(curwin) : 0))
  	curwin->w_redr_type = NOT_VALID;
  #endif
  
--- 420,430 ----
  	check_for_delay(FALSE);
  
  #ifdef FEAT_LINEBREAK
!     /* Force redraw when width of 'number' or 'relativenumber' column
!      * changes. */
      if (curwin->w_redr_type < NOT_VALID
! 	   && curwin->w_nrwidth != ((curwin->w_p_nu || curwin->w_p_rnu)
! 				    ? number_width(curwin) : 0))
  	curwin->w_redr_type = NOT_VALID;
  #endif
  
***************
*** 861,868 ****
  #endif
  
  #ifdef FEAT_LINEBREAK
!     /* Force redraw when width of 'number' column changes. */
!     i = wp->w_p_nu ? number_width(wp) : 0;
      if (wp->w_nrwidth != i)
      {
  	type = NOT_VALID;
--- 863,871 ----
  #endif
  
  #ifdef FEAT_LINEBREAK
!     /* Force redraw when width of 'number' or 'relativenumber' column
!      * changes. */
!     i = (wp->w_p_nu || wp->w_p_rnu) ? number_width(wp) : 0;
      if (wp->w_nrwidth != i)
      {
  	type = NOT_VALID;
***************
*** 2108,2114 ****
      /* Build the fold line:
       * 1. Add the cmdwin_type for the command-line window
       * 2. Add the 'foldcolumn'
!      * 3. Add the 'number' column
       * 4. Compose the text
       * 5. Add the text
       * 6. set highlighting for the Visual area an other text
--- 2111,2117 ----
      /* Build the fold line:
       * 1. Add the cmdwin_type for the command-line window
       * 2. Add the 'foldcolumn'
!      * 3. Add the 'number' or 'relativenumber' column
       * 4. Compose the text
       * 5. Add the text
       * 6. set highlighting for the Visual area an other text
***************
*** 2170,2176 ****
  				 ScreenAttrs[off + (p) + ri] = v
  #endif
  
!     /* Set all attributes of the 'number' column and the text */
      RL_MEMSET(col, hl_attr(HLF_FL), W_WIDTH(wp) - col);
  
  #ifdef FEAT_SIGNS
--- 2173,2180 ----
  				 ScreenAttrs[off + (p) + ri] = v
  #endif
  
!     /* Set all attributes of the 'number' or 'relativenumber' column and the
!      * text */
      RL_MEMSET(col, hl_attr(HLF_FL), W_WIDTH(wp) - col);
  
  #ifdef FEAT_SIGNS
***************
*** 2196,2213 ****
  #endif
  
      /*
!      * 3. Add the 'number' column
       */
!     if (wp->w_p_nu)
      {
  	len = W_WIDTH(wp) - col;
  	if (len > 0)
  	{
  	    int	    w = number_width(wp);
  
  	    if (len > w + 1)
  		len = w + 1;
! 	    sprintf((char *)buf, "%*ld ", w, (long)lnum);
  #ifdef FEAT_RIGHTLEFT
  	    if (wp->w_p_rl)
  		/* the line number isn't reversed */
--- 2200,2226 ----
  #endif
  
      /*
!      * 3. Add the 'number' or 'relativenumber' column
       */
!     if (wp->w_p_nu || wp->w_p_rnu)
      {
  	len = W_WIDTH(wp) - col;
  	if (len > 0)
  	{
  	    int	    w = number_width(wp);
+ 	    long num;
  
  	    if (len > w + 1)
  		len = w + 1;
! 
! 	    if (wp->w_p_nu)
! 		/* 'number' */
! 		num = (long)lnum;
! 	    else
! 		/* 'relativenumber', don't use negative numbers */
! 		num = (long)abs((int)get_cursor_rel_lnum(wp, lnum));
! 
! 	    sprintf((char *)buf, "%*ld ", w, (long)num);
  #ifdef FEAT_RIGHTLEFT
  	    if (wp->w_p_rl)
  		/* the line number isn't reversed */
***************
*** 3287,3295 ****
  	    if (draw_state == WL_NR - 1 && n_extra == 0)
  	    {
  		draw_state = WL_NR;
! 		/* Display the line number.  After the first fill with blanks
! 		 * when the 'n' flag isn't in 'cpo' */
! 		if (wp->w_p_nu
  			&& (row == startrow
  #ifdef FEAT_DIFF
  			    + filler_lines
--- 3300,3308 ----
  	    if (draw_state == WL_NR - 1 && n_extra == 0)
  	    {
  		draw_state = WL_NR;
! 		/* Display the absolute or relative line number. After the
! 		 * first fill with blanks when the 'n' flag isn't in 'cpo' */
! 		if ((wp->w_p_nu || wp->w_p_rnu)
  			&& (row == startrow
  #ifdef FEAT_DIFF
  			    + filler_lines
***************
*** 3303,3310 ****
  #endif
  			    )
  		    {
  			sprintf((char *)extra, "%*ld ",
! 						number_width(wp), (long)lnum);
  			if (wp->w_skipcol > 0)
  			    for (p_extra = extra; *p_extra == ' '; ++p_extra)
  				*p_extra = '-';
--- 3316,3333 ----
  #endif
  			    )
  		    {
+ 			long num;
+ 
+ 			if (wp->w_p_nu)
+ 			    /* 'number' */
+ 			    num = (long)lnum;
+ 			else
+ 			    /* 'relativenumber', don't use negative numbers */
+ 			    num = (long)abs((int)get_cursor_rel_lnum(wp,
+ 								    lnum));
+ 
  			sprintf((char *)extra, "%*ld ",
! 						number_width(wp), num);
  			if (wp->w_skipcol > 0)
  			    for (p_extra = extra; *p_extra == ' '; ++p_extra)
  				*p_extra = '-';
***************
*** 4652,4658 ****
  	else
  	    --n_skip;
  
! 	/* Only advance the "vcol" when after the 'number' column. */
  	if (draw_state >= WL_SBR
  #ifdef FEAT_DIFF
  		&& filler_todo <= 0
--- 4675,4682 ----
  	else
  	    --n_skip;
  
! 	/* Only advance the "vcol" when after the 'number' or 'relativenumber'
! 	 * column. */
  	if (draw_state >= WL_SBR
  #ifdef FEAT_DIFF
  		&& filler_todo <= 0
***************
*** 9567,9574 ****
  
  #if defined(FEAT_LINEBREAK) || defined(PROTO)
  /*
!  * Return the width of the 'number' column.
!  * Caller may need to check if 'number' is set.
   * Otherwise it depends on 'numberwidth' and the line count.
   */
      int
--- 9591,9598 ----
  
  #if defined(FEAT_LINEBREAK) || defined(PROTO)
  /*
!  * Return the width of the 'number' and 'relativenumber' column.
!  * Caller may need to check if 'number' or 'relativenumber' is set.
   * Otherwise it depends on 'numberwidth' and the line count.
   */
      int
***************
*** 9578,9584 ****
      int		n;
      linenr_T	lnum;
  
!     lnum = wp->w_buffer->b_ml.ml_line_count;
      if (lnum == wp->w_nrwidth_line_count)
  	return wp->w_nrwidth_width;
      wp->w_nrwidth_line_count = lnum;
--- 9602,9614 ----
      int		n;
      linenr_T	lnum;
  
!     if (wp->w_p_nu)
! 	/* 'numer' */
! 	lnum = wp->w_buffer->b_ml.ml_line_count;
!     else
! 	/* 'relativenumber' */
! 	lnum = wp->w_height;
! 
      if (lnum == wp->w_nrwidth_line_count)
  	return wp->w_nrwidth_width;
      wp->w_nrwidth_line_count = lnum;
Index: src/structs.h
===================================================================
*** src/structs.h	(revision 908)
--- src/structs.h	(working copy)
***************
*** 169,174 ****
--- 169,176 ----
  #define w_p_list w_onebuf_opt.wo_list	/* 'list' */
      int		wo_nu;
  #define w_p_nu w_onebuf_opt.wo_nu	/* 'number' */
+     int		wo_rnu;
+ #define w_p_rnu w_onebuf_opt.wo_rnu	/* 'relativenumber' */
  #ifdef FEAT_LINEBREAK
      long	wo_nuw;
  # define w_p_nuw w_onebuf_opt.wo_nuw	/* 'numberwidth' */
***************
*** 1885,1891 ****
  				       recomputed */
  #endif
  #ifdef FEAT_LINEBREAK
!     int		w_nrwidth;	    /* width of 'number' column being used */
  #endif
  
      /*
--- 1887,1894 ----
  				       recomputed */
  #endif
  #ifdef FEAT_LINEBREAK
!     int		w_nrwidth;	    /* width of 'number' and 'relativenumber'
! 				       column being used */
  #endif
  
      /*
