annotate runtime/indent/sql.vim @ 30092:53e7e912eeec v9.0.0382

patch 9.0.0382: freeing the wrong string on failure Commit: https://github.com/vim/vim/commit/31ea6bf530a814991f669122dbc9921117a862c3 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Sep 5 10:47:13 2022 +0100 patch 9.0.0382: freeing the wrong string on failure Problem: Freeing the wrong string on failure. Solution: Adjust the argument. Reorder the code.
author Bram Moolenaar <Bram@vim.org>
date Mon, 05 Sep 2022 12:00:06 +0200
parents b9740fb41986
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
718
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
1 " Vim indent file loader
856
8cd729851562 updated for version 7.0g
vimboss
parents: 718
diff changeset
2 " Language: SQL
718
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
3 " Maintainer: David Fishburn <fishburn at ianywhere dot com>
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
4 " Last Change: Thu Sep 15 2005 10:27:51 AM
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
5 " Version: 1.0
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
6 " Download: http://vim.sourceforge.net/script.php?script_id=495
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
7
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
8 " Description: Checks for a:
856
8cd729851562 updated for version 7.0g
vimboss
parents: 718
diff changeset
9 " buffer local variable,
8cd729851562 updated for version 7.0g
vimboss
parents: 718
diff changeset
10 " global variable,
718
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
11 " If the above exist, it will source the type specified.
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
12 " If none exist, it will source the default sqlanywhere.vim file.
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
13
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
14
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
15 " Only load this indent file when no other was loaded.
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
16 if exists("b:did_indent")
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
17 finish
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
18 endif
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
19
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
20 " Default to the standard Vim distribution file
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
21 let filename = 'sqlanywhere'
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
22
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
23 " Check for overrides. Buffer variables have the highest priority.
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
24 if exists("b:sql_type_override")
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
25 " Check the runtimepath to see if the file exists
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
26 if globpath(&runtimepath, 'indent/'.b:sql_type_override.'.vim') != ''
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
27 let filename = b:sql_type_override
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
28 endif
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
29 elseif exists("g:sql_type_default")
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
30 if globpath(&runtimepath, 'indent/'.g:sql_type_default.'.vim') != ''
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
31 let filename = g:sql_type_default
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
32 endif
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
33 endif
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
34
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
35 " Source the appropriate file
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
36 exec 'runtime indent/'.filename.'.vim'
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
37
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
38
1619
b9740fb41986 updated for version 7.2a
vimboss
parents: 856
diff changeset
39 " vim:sw=4: