annotate runtime/indent/framescript.vim @ 11006:b3601a8eb679 v8.0.0392

patch 8.0.0392: GUI test fails with Athena and Motif commit https://github.com/vim/vim/commit/e0c31f6a304496b597a51ce98af419ec815bec74 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Mar 1 15:07:05 2017 +0100 patch 8.0.0392: GUI test fails with Athena and Motif Problem: GUI test fails with Athena and Motif. Solution: Add test_ignore_error(). Use it to ignore the "failed to create input context" error.
author Christian Brabandt <cb@256bit.org>
date Wed, 01 Mar 2017 15:15:05 +0100
parents f4f8014d516e
children 1218c5353e2b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1698
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
1 " Vim indent file
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
2 " Language: FrameScript
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
3 " Maintainer: Nikolai Weibull <now@bitwi.se>
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
4 " Latest Revision: 2008-07-19
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
5
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
6 if exists("b:did_indent")
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
7 finish
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
8 endif
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
9 let b:did_indent = 1
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
10
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
11 setlocal indentexpr=GetFrameScriptIndent()
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
12 setlocal indentkeys=!^F,o,O,0=~Else,0=~EndIf,0=~EndLoop,0=~EndSub
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
13 setlocal nosmartindent
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
14
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
15 if exists("*GetFrameScriptIndent")
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
16 finish
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
17 endif
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
18
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
19 function GetFrameScriptIndent()
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
20 let lnum = prevnonblank(v:lnum - 1)
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
21
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
22 if lnum == 0
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
23 return 0
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
24 endif
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
25
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
26 if getline(v:lnum) =~ '^\s*\*'
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
27 return cindent(v:lnum)
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
28 endif
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
29
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
30 let ind = indent(lnum)
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
31
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
32 if getline(lnum) =~? '^\s*\%(If\|Loop\|Sub\)'
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
33 let ind = ind + &sw
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
34 endif
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
35
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
36 if getline(v:lnum) =~? '^\s*\%(Else\|End\%(If\|Loop\|Sub\)\)'
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
37 let ind = ind - &sw
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
38 endif
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
39
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
40 return ind
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
41 endfunction