Attached is an updated patch for the 'linenumber' option (it's getting hairier and hairier! But not that much. I'd say it's less toy-ish by now :)
It contains a bugfix - "set (inv|no)(nu|rnu)" did not correctly set
'linenumber' as well.
Earlier in the thread someone complained about the alignment of the
actual number compared to the relative number. I've added one more
option value to 'linenumber' to address this:
'linenumber' 'lnr' string (default "none")
local to window
{not in Vi}
Controls how line numbers are shown:
value effect ~
none No line numbers are shown
number Same as ":set number"
relative Same as ":set relativenumber"
numrel Same as ":set relativenumber", but instead of
showing '0' for the current line, show the actual
line number instead. The actual line number is
left-aligned to differentiate it from the relative
line number.
numrelaligned Same as ":set linenumber=numrel", but keep the
actual and relative line numbers aligned to the same
side.
I think this should cater for everyone - people who prefer relative
number but doesn't like color but still want to differentiate the
actual number - so they set lnr to 'numrel', and people who doesn't
like jagged line numbers so they set lnr to 'numrelaligned'.
On a different matter:
While working on this I noticed another bug, found in vanilla vim
changeset: 4089:30b3b1da0350:
$ src/vim -u NONE -U NONE src/misc1.c -c 'set nu|for i in
range(5)|split|endfor'
:" Now we should have 6 windows for src/misc1.c, go to the bottom window
:5wincmd j
:" Go to the last line in the window
:normal L
:windo set nu?
number
number
10808 }
number
number
number
Press ENTER or type command to continue
And notice that one or two of the output of "windo set nu?" includes
some text from the buffer.
Nazri
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.
lnr.diff
Description: Binary data
