Mercurial > vim
annotate runtime/indent/xf86conf.vim @ 19627:6b1564fcab92 v8.2.0370
patch 8.2.0370: the typebuf_was_filled flag is sometimes not reset
Commit: https://github.com/vim/vim/commit/e49b4bb89505fad28cf89f0891aef3e2d397919e
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Mar 11 13:01:40 2020 +0100
patch 8.2.0370: the typebuf_was_filled flag is sometimes not reset
Problem: The typebuf_was_filled flag is sometimes not reset, which may
cause a hang.
Solution: Make sure typebuf_was_filled is reset when the typeahead buffer is
empty.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 11 Mar 2020 13:15:04 +0100 |
parents | d0a20101ecb2 |
children | 4d76b3e07c07 |
rev | line source |
---|---|
7 | 1 " Vim indent file |
11062 | 2 " Language: XFree86 Configuration File |
3 " Previous Maintainer: Nikolai Weibull <now@bitwi.se> | |
4 " Latest Revision: 2006-12-20 | |
7 | 5 |
6 if exists("b:did_indent") | |
7 finish | |
8 endif | |
9 let b:did_indent = 1 | |
10 | |
11 setlocal indentexpr=GetXF86ConfIndent() | |
12 setlocal indentkeys=!^F,o,O,=End | |
1224 | 13 setlocal nosmartindent |
7 | 14 |
15 if exists("*GetXF86ConfIndent") | |
16 finish | |
17 endif | |
18 | |
19 function GetXF86ConfIndent() | |
20 let lnum = prevnonblank(v:lnum - 1) | |
21 | |
22 if lnum == 0 | |
23 return 0 | |
24 endif | |
25 | |
26 let ind = indent(lnum) | |
27 | |
375 | 28 if getline(lnum) =~? '^\s*\(Sub\)\=Section\>' |
11160 | 29 let ind = ind + shiftwidth() |
375 | 30 endif |
31 | |
1224 | 32 if getline(v:lnum) =~? '^\s*End\(Sub\)\=Section\>' |
11160 | 33 let ind = ind - shiftwidth() |
7 | 34 endif |
35 | |
36 return ind | |
37 endfunction |