view runtime/autoload/contextcomplete.vim @ 14548:806e1a2648c6 v8.1.0287

patch 8.1.0287: MAX is not defined everywhere commit https://github.com/vim/vim/commit/37b15568c26e669c333903a70422eacc09488f79 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Aug 14 22:08:25 2018 +0200 patch 8.1.0287: MAX is not defined everywhere Problem: MAX is not defined everywhere. Solution: Define MAX where needed.
author Christian Brabandt <cb@256bit.org>
date Tue, 14 Aug 2018 22:15:05 +0200
parents 07d2b5a3b7cc
children
line wrap: on
line source

" Language:           ConTeXt typesetting engine
" Maintainer:         Nicola Vitacolonna <nvitacolonna@gmail.com>
" Latest Revision:    2016 Oct 15

let s:keepcpo= &cpo
set cpo&vim

" Complete keywords in MetaPost blocks
function! contextcomplete#Complete(findstart, base)
  if a:findstart == 1
    if len(synstack(line('.'), 1)) > 0 &&
          \ synIDattr(synstack(line('.'), 1)[0], "name") ==# 'contextMPGraphic'
      return syntaxcomplete#Complete(a:findstart, a:base)
    else
      return -3
    endif
  else
    return syntaxcomplete#Complete(a:findstart, a:base)
  endif
endfunction

let &cpo = s:keepcpo
unlet s:keepcpo

" vim: sw=2 fdm=marker