Mercurial > vim
annotate runtime/syntax/wvdial.vim @ 33634:7c43330262d4 v9.0.2058
patch 9.0.2058: tests: avoid error when no swap files exist
Commit: https://github.com/vim/vim/commit/a36acb7ac444a789440dc30e0f04d5427069face
Author: zeertzjq <zeertzjq@outlook.com>
Date: Sat Oct 21 11:50:26 2023 +0200
patch 9.0.2058: tests: avoid error when no swap files exist
Problem: tests: avoid error when no swap files exist
Solution: use unlet! so that no error message is reported
in case the variable does not exists
When s:GetSwapFileList() does not find any swapfiles, it will return an
empty list []. This means, that the variable 'name' will not be
declared, cause the following unlet command to fail and causing a 1 sec
delay on running the tests.
So let's instead use the :unlet! command which simply skips reporting an
error when the variable given as parameter does not exists.
closes: #13396
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 21 Oct 2023 12:00:04 +0200 |
parents | 3fc0f57ecb91 |
children |
rev | line source |
---|---|
7 | 1 " Vim syntax file |
2 " Language: Configuration file for WvDial | |
3 " Maintainer: Prahlad Vaidyanathan <slime@vsnl.net> | |
4 " Last Update: Mon, 15 Oct 2001 09:39:03 Indian Standard Time | |
5 | |
6 " Quit if syntax file is already loaded | |
7 if exists("b:current_syntax") | |
8 finish | |
9 endif | |
10 | |
11 syn match wvdialComment "^;.*$"lc=1 | |
12 syn match wvdialComment "[^\\];.*$"lc=1 | |
13 syn match wvdialSection "^\s*\[.*\]" | |
14 syn match wvdialValue "=.*$"ms=s+1 | |
15 syn match wvdialValue "\s*[^ ;"' ]\+"lc=1 | |
16 syn match wvdialVar "^\s*\(Inherits\|Modem\|Baud\|Init.\|Phone\|Area\ Code\|Dial\ Prefix\|Dial\ Command\|Login\|Login\| Prompt\|Password\|Password\ Prompt\|PPPD\ Path\|Force\ Address\|Remote\ Name\|Carrier\ Check\|Stupid\ [Mm]ode\|New\ PPPD\|Default\ Reply\|Auto\ Reconnect\|SetVolume\|Username\)" | |
17 syn match wvdialEqual "=" | |
18 | |
19 " The default highlighting | |
20 hi def link wvdialComment Comment | |
21 hi def link wvdialSection PreProc | |
22 hi def link wvdialVar Identifier | |
23 hi def link wvdialValue String | |
24 hi def link wvdialEqual Statement | |
25 | |
26 let b:current_syntax = "wvdial" | |
27 | |
28 "EOF vim: tw=78:ft=vim:ts=8 |