Mercurial > vim
view runtime/autoload/contextcomplete.vim @ 22298:07e48ee8c3bb v8.2.1698
patch 8.2.1698: cannot lock a variable in legacy Vim script like in Vim9
Commit: https://github.com/vim/vim/commit/a187c43cfe8863d48b2159d695fedcb71f8525c1
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Sep 16 21:08:28 2020 +0200
patch 8.2.1698: cannot lock a variable in legacy Vim script like in Vim9
Problem: Cannot lock a variable in legacy Vim script like in Vim9.
Solution: Make ":lockvar 0" work.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 16 Sep 2020 21: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