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:
Talia 2018-10-15 10:07:05 +02:00
parent 1ad2b3ee6b
commit 64e4e304f8

2
vimrc
View file

@ -329,7 +329,7 @@ command! Closeall bufdo bdelete
command! Context bufdo bdelete | e .
command! Kontext Context
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
command! L lopen | set number | set norelativenumber