Mercurial > vim
annotate runtime/syntax/messages.vim @ 30207:7147c6059e80 v9.0.0439
patch 9.0.0439: cursor wrong if inserting before line with virtual text above
Commit: https://github.com/vim/vim/commit/88b79cb7d47e2e1fee1baf4016c50b861e6b21c4
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Sep 10 22:32:14 2022 +0100
patch 9.0.0439: cursor wrong if inserting before line with virtual text above
Problem: Cursor wrong if inserting before line with virtual text above.
Solution: Add the width of the "above" virtual text to the cursor position.
(issue #11084)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 10 Sep 2022 23:45:02 +0200 |
parents | 5b37a0bf7e3a |
children |
rev | line source |
---|---|
1125 | 1 " Vim syntax file |
2 " Language: /var/log/messages file | |
3 " Maintainer: Yakov Lerner <iler.ml@gmail.com> | |
1668 | 4 " Latest Revision: 2008-06-29 |
5 " Changes: 2008-06-29 support for RFC3339 tuimestamps James Vega | |
7707
41768bcebc9b
commit https://github.com/vim/vim/commit/13d5aeef56e3140a8eb8f40c7062aa1c5700f76e
Christian Brabandt <cb@256bit.org>
parents:
1668
diff
changeset
|
6 " 2016 Jan 19: messagesDate changed by Bram |
23931 | 7 " 2021 Jan 27: messagesHourRFC3339 changed from #946 |
1125 | 8 |
9 if exists("b:current_syntax") | |
10 finish | |
11 endif | |
12 | |
13 let s:cpo_save = &cpo | |
14 set cpo&vim | |
15 | |
1668 | 16 syn match messagesBegin display '^' nextgroup=messagesDate,messagesDateRFC3339 |
1125 | 17 |
7707
41768bcebc9b
commit https://github.com/vim/vim/commit/13d5aeef56e3140a8eb8f40c7062aa1c5700f76e
Christian Brabandt <cb@256bit.org>
parents:
1668
diff
changeset
|
18 syn match messagesDate contained display '[[:lower:][:upper:]][[:lower:][:upper:]][[:lower:][:upper:]] [ 0-9]\d *' |
1125 | 19 \ nextgroup=messagesHour |
20 | |
21 syn match messagesHour contained display '\d\d:\d\d:\d\d\s*' | |
22 \ nextgroup=messagesHost | |
23 | |
1668 | 24 syn match messagesDateRFC3339 contained display '\d\{4}-\d\d-\d\d' |
25 \ nextgroup=messagesRFC3339T | |
26 | |
27 syn match messagesRFC3339T contained display '\cT' | |
28 \ nextgroup=messagesHourRFC3339 | |
29 | |
23931 | 30 syn match messagesHourRFC3339 contained display '\c\d\d:\d\d:\d\d\(\.\d\+\)\=\([+-]\d\d:\d\d\|Z\)\s*' |
1668 | 31 \ nextgroup=messagesHost |
32 | |
1125 | 33 syn match messagesHost contained display '\S*\s*' |
34 \ nextgroup=messagesLabel | |
35 | |
36 syn match messagesLabel contained display '\s*[^:]*:\s*' | |
37 \ nextgroup=messagesText contains=messagesKernel,messagesPID | |
38 | |
39 syn match messagesPID contained display '\[\zs\d\+\ze\]' | |
40 | |
41 syn match messagesKernel contained display 'kernel:' | |
42 | |
43 | |
44 syn match messagesIP '\d\+\.\d\+\.\d\+\.\d\+' | |
45 | |
46 syn match messagesURL '\w\+://\S\+' | |
47 | |
48 syn match messagesText contained display '.*' | |
49 \ contains=messagesNumber,messagesIP,messagesURL,messagesError | |
50 | |
51 syn match messagesNumber contained '0x[0-9a-fA-F]*\|\[<[0-9a-f]\+>\]\|\<\d[0-9a-fA-F]*' | |
52 | |
53 syn match messagesError contained '\c.*\<\(FATAL\|ERROR\|ERRORS\|FAILED\|FAILURE\).*' | |
54 | |
55 | |
56 hi def link messagesDate Constant | |
57 hi def link messagesHour Type | |
1668 | 58 hi def link messagesDateRFC3339 Constant |
59 hi def link messagesHourRFC3339 Type | |
60 hi def link messagesRFC3339T Normal | |
1125 | 61 hi def link messagesHost Identifier |
62 hi def link messagesLabel Operator | |
63 hi def link messagesPID Constant | |
64 hi def link messagesKernel Special | |
65 hi def link messagesError ErrorMsg | |
66 hi def link messagesIP Constant | |
67 hi def link messagesURL Underlined | |
68 hi def link messagesText Normal | |
69 hi def link messagesNumber Number | |
70 | |
71 let b:current_syntax = "messages" | |
72 | |
73 let &cpo = s:cpo_save | |
74 unlet s:cpo_save |