On Sun, Oct 17, 2021 at 02:13:32PM +0100, Bram Moolenaar wrote:
> *** ../vim-8.2.3527/runtime/doc/insert.txt    2021-10-16 15:41:25.378336694 
> +0100
> --- runtime/doc/insert.txt    2021-10-17 13:36:08.557348706 +0100
> ***************
> *** 855,860 ****
> --- 842,902 ----
> [‥]
> + 
> +     func Thesaur(findstart, base)
> +         if a:findstart
> +             let line = getline('.')
> +             let start = col('.') - 1
> +             while start > 0 && line[start - 1] =~ '\a'
> +                let start -= 1
> +             endwhile
> +             return start
> +         else
> +             let res = []
> +             let h = ''
> +             for l in split(system('aiksaurus '.shellescape(a:base)), '\n')
> +                 if l[:3] == '=== '
> +                     let h = substitute(l[4:], ' =*$', '', '')
> +                 elseif l[0] =~ '\a'
> +                     call extend(res, map(split(l, ', '), {_, val -> 
> {'word': val, 'menu': '('.h.')'}}))
> +                 endif
> +             endfor
> +             return res
> +         endif
> +     endfunc
> + 
> +     if has('patch-8.2.3520')

Why not use "exists('+thesaurusfunc')" here?  IMHO, patch number checks
should be reserved for things that don't have more explicit checks.

> +         set thesaurusfunc=Thesaur
> +     endif
> + 

Cheers,
-- 
James
GPG Key: 4096R/91BF BF4D 6956 BD5D F7B7  2D23 DFE6 91AE 331B A3DB

-- 
-- 
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/20211018011029.gxqx2y4kfzhd7boh%40localhost.

Raspunde prin e-mail lui