annotate runtime/syntax/modula2.vim @ 34511:5397ce113043 v9.1.0161

patch 9.1.0161: expand() removes slash after env variable that ends with colon Commit: https://github.com/vim/vim/commit/13a014452a7a020a119ac555a690c65b41f3126d Author: zeertzjq <zeertzjq@outlook.com> Date: Sat Mar 9 17:44:46 2024 +0100 patch 9.1.0161: expand() removes slash after env variable that ends with colon Problem: expand() removes a slash after an environment variable that ends with a colon on Windows. Solution: Check the correct char for a colon (zeertzjq) closes: #14161 Note: Vim still removes the path-separator at the end, if another path separator follows directly after it, e.g. on: ``` echo $FOO='/usr/' echo expand('$FOO/bar') == '/usr/bar' ``` see: ,----[ misc1.c:1630 ] | // if var[] ends in a path separator and tail[] starts | // with it, skip a character | if (after_pathsep(dst, dst + c) | #if defined(BACKSLASH_IN_FILENAME) || defined(AMIGA) | && (dst == save_dst || dst[-1] != ':') | #endif | && vim_ispathsep(*tail)) | ++tail; `---- Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Sat, 09 Mar 2024 18:15:02 +0100
parents ff27442e7851
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim syntax file
34092
ff27442e7851 patch 9.1.0013: Modula2 filetype support lacking
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
2 " Language: Modula-2
ff27442e7851 patch 9.1.0013: Modula2 filetype support lacking
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
3 " Maintainer: Doug Kearns <dougkearns@gmail.com>
ff27442e7851 patch 9.1.0013: Modula2 filetype support lacking
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
4 " Previous Maintainer: pf@artcom0.north.de (Peter Funk)
ff27442e7851 patch 9.1.0013: Modula2 filetype support lacking
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
5 " Last Change: 2024 Jan 04
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
7 if exists("b:current_syntax")
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10
34092
ff27442e7851 patch 9.1.0013: Modula2 filetype support lacking
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
11 let dialect = modula2#GetDialect()
ff27442e7851 patch 9.1.0013: Modula2 filetype support lacking
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
12 exe "runtime! syntax/modula2/opt/" .. dialect .. ".vim"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 let b:current_syntax = "modula2"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15
34092
ff27442e7851 patch 9.1.0013: Modula2 filetype support lacking
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
16 " vim: nowrap sw=2 sts=2 ts=8 noet: