Mercurial > hg > nginx-quic
annotate contrib/vim/indent/nginx.vim @ 8252:2fec22332ff4
Removed extra allocation for r->uri.
The ngx_http_parse_complex_uri() function cannot make URI longer and does
not null-terminate URI, so there is no need to allocate an extra byte. This
allocation appears to be a leftover from changes in 461:a88a3e4e158f (0.1.5),
where null-termination of r->uri and many other strings was removed.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Thu, 10 Dec 2020 20:09:39 +0300 |
parents | f38043bd15f5 |
children |
rev | line source |
---|---|
5460
f38043bd15f5
Contrib: add vim scripts to contrib/ directory.
Evan Miller <emmiller@gmail.com>
parents:
diff
changeset
|
1 if exists("b:did_indent") |
f38043bd15f5
Contrib: add vim scripts to contrib/ directory.
Evan Miller <emmiller@gmail.com>
parents:
diff
changeset
|
2 finish |
f38043bd15f5
Contrib: add vim scripts to contrib/ directory.
Evan Miller <emmiller@gmail.com>
parents:
diff
changeset
|
3 endif |
f38043bd15f5
Contrib: add vim scripts to contrib/ directory.
Evan Miller <emmiller@gmail.com>
parents:
diff
changeset
|
4 let b:did_indent = 1 |
f38043bd15f5
Contrib: add vim scripts to contrib/ directory.
Evan Miller <emmiller@gmail.com>
parents:
diff
changeset
|
5 |
f38043bd15f5
Contrib: add vim scripts to contrib/ directory.
Evan Miller <emmiller@gmail.com>
parents:
diff
changeset
|
6 setlocal indentexpr= |
f38043bd15f5
Contrib: add vim scripts to contrib/ directory.
Evan Miller <emmiller@gmail.com>
parents:
diff
changeset
|
7 |
f38043bd15f5
Contrib: add vim scripts to contrib/ directory.
Evan Miller <emmiller@gmail.com>
parents:
diff
changeset
|
8 " cindent actually works for nginx' simple file structure |
f38043bd15f5
Contrib: add vim scripts to contrib/ directory.
Evan Miller <emmiller@gmail.com>
parents:
diff
changeset
|
9 setlocal cindent |
f38043bd15f5
Contrib: add vim scripts to contrib/ directory.
Evan Miller <emmiller@gmail.com>
parents:
diff
changeset
|
10 " Just make sure that the comments are not reset as defs would be. |
f38043bd15f5
Contrib: add vim scripts to contrib/ directory.
Evan Miller <emmiller@gmail.com>
parents:
diff
changeset
|
11 setlocal cinkeys-=0# |