Fix edge case in vimrc Number command
At exact powers of 10, the command would use one less digit than needed.
This commit is contained in:
parent
1ad2b3ee6b
commit
64e4e304f8
1 changed files with 1 additions and 1 deletions
2
vimrc
2
vimrc
|
@ -329,7 +329,7 @@ command! Closeall bufdo bdelete
|
||||||
command! Context bufdo bdelete | e .
|
command! Context bufdo bdelete | e .
|
||||||
command! Kontext Context
|
command! Kontext Context
|
||||||
command! -range=% Numbers <line1>,<line2>
|
command! -range=% Numbers <line1>,<line2>
|
||||||
\ s/^/\=printf("%0".float2nr(ceil(log10(<line2>)))."i", line("."))."\t"/
|
\ s/^/\=printf("%0".float2nr(ceil(log10(<line2>+1)))."i", line("."))."\t"/
|
||||||
\ | noh
|
\ | noh
|
||||||
|
|
||||||
command! L lopen | set number | set norelativenumber
|
command! L lopen | set number | set norelativenumber
|
||||||
|
|
Loading…
Reference in a new issue