Mercurial > vim
view runtime/indent/treetop.vim @ 27904:7422add1afd1 v8.2.4477
patch 8.2.4477: crash when using fuzzy completion
Commit: https://github.com/vim/vim/commit/29ab6ce9f36660cffaad3c8789e71162e5db5d2f
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Feb 26 15:52:08 2022 +0000
patch 8.2.4477: crash when using fuzzy completion
Problem: Crash when using fuzzy completion.
Solution: Temporary fix: put back regexp. (closes https://github.com/vim/vim/issues/9851)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 26 Feb 2022 17:00:04 +0100 |
parents | 11b656e74444 |
children | 4d76b3e07c07 |
line wrap: on
line source
" Vim indent file " Language: Treetop " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2011-03-14 if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal indentexpr=GetTreetopIndent() setlocal indentkeys=0{,0},!^F,o,O,=end setlocal nosmartindent if exists("*GetTreetopIndent") finish endif function GetTreetopIndent() let pnum = prevnonblank(v:lnum - 1) if pnum == 0 return 0 endif let ind = indent(pnum) let line = getline(pnum) if line =~ '^\s*\%(grammar\|module\|rule\)\>' let ind += shiftwidth() endif let line = getline(v:lnum) if line =~ '^\s*end\>' let ind -= shiftwidth() end return ind endfunction