From 81fdc3b98880e94e2737f27096c7978e28958690 Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Mon, 25 Nov 2019 17:13:33 +0100 Subject: [PATCH] plugin: make use of rand() function from vim 8.1.2342 --- plugin/airline.vim | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugin/airline.vim b/plugin/airline.vim index 13e6bbda..1e9b25bb 100644 --- a/plugin/airline.vim +++ b/plugin/airline.vim @@ -251,7 +251,10 @@ function! s:airline_extensions() endfunction function! s:rand(max) abort - if has("reltime") + if exists("*rand") + " Needs Vim 8.1.2342 + let number=rand() + elseif has("reltime") let timerstr=reltimestr(reltime()) let number=split(timerstr, '\.')[1]+0 elseif has("win32") && &shell =~ 'cmd'