Paul Jolly wrote:

> > What do you want to use the patchlevel for?  If it's about checking for
> > a certain feature, use this:
> >         if has("patch-7.4.248")
> >
> > ":help has-patch" for details.
> 
> Thanks, Bram and Andy.
> 
> In much the same vein as the config functions discussion, I want to
> push data to govim rather than have it pull it (because that involves
> a round trip). A call to has("xxx") involves a roundtrip from govim ->
> Vim. If this is on a hot path, it gets expensive.
> 
> And it's totally unnecessary because the version of Vim will not
> change from the start.
> 
> > It's plausible someone would build with a subset of patches (and neovim 
> > does this).
> 
> That's not something I'm solving for here. I'm only looking to support
> tagged versions of Vim/Gvim. Neovim will similarly be tested against
> tagged versions, and the checks there will be against the Neovim
> version (because that's what the user installs/knows).
> 
> For example, I have a minimum required version to use govim of
> Vim/Gvim v8.1.1158. In order to take advantage of delta-based updates
> (that use listener_add) you need at least v8.1.1512.

Hmm, it's possible if you ignore security fixes, these sometimes skip a
longer range of patches.

We could add v:longversion or v:versionlong, with:

        major version (one digit)
        minor version (two digits)
        patchlevel (four digits)

Current version would be 8011523.  Then you can easily compare with the
version you need, no string parsing or anything.

-- 
"Hit any key to continue" does _not_ mean you can hit the on/off button!

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/201906131840.x5DIeRZ2017549%40masaka.moolenaar.net.
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui