annotate runtime/syntax/strace.vim @ 34625:ad1b0609b2f8 v9.1.0201

patch 9.1.0201: gM not working correctly with virt text Commit: https://github.com/vim/vim/commit/366c81a2005370ac738618d889ec0337397a9f96 Author: Dylan Thacker-Smith <dylan.ah.smith@gmail.com> Date: Sun Mar 24 09:46:56 2024 +0100 patch 9.1.0201: gM not working correctly with virt text Problem: `gM` would include outer virtual text and its padding when getting the line length used to calculate the middle of the line, putting the cursor much closer to virtual text lines. Solution: Exclude outer virtual text in getting the line length for `gM`, so that virtual text doesn't influence where the cursor is moved to (Dylan Thacker-Smith). closes: #14262 Signed-off-by: Dylan Thacker-Smith <dylan.ah.smith@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Sun, 24 Mar 2024 10:00:07 +0100
parents 5825405e4e2c
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Language: strace output
6530
435956324539 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
3 " Maintainer: David Necas (Yeti) <yeti@physics.muni.cz>
27459
5825405e4e2c Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
4 " Last Change: 2022 Jan 29
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 " Setup
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 6530
diff changeset
7 " quit when a syntax file was already loaded
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 6530
diff changeset
8 if exists("b:current_syntax")
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 6530
diff changeset
9 finish
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 syn case match
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 " Parse the line
6530
435956324539 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
15 syn match straceSpecialChar "\\\o\{1,3}\|\\." contained
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 syn region straceString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=straceSpecialChar oneline
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 syn match straceNumber "\W[+-]\=\(\d\+\)\=\.\=\d\+\([eE][+-]\=\d\+\)\="lc=1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 syn match straceNumber "\W0x\x\+"lc=1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 syn match straceNumberRHS "\W\(0x\x\+\|-\=\d\+\)"lc=1 contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 syn match straceOtherRHS "?" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 syn match straceConstant "[A-Z_]\{2,}"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 syn region straceVerbosed start="(" end=")" matchgroup=Normal contained oneline
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 syn region straceReturned start="\s=\s" end="$" contains=StraceEquals,straceNumberRHS,straceOtherRHS,straceConstant,straceVerbosed oneline transparent
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 syn match straceEquals "\s=\s"ms=s+1,me=e-1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 syn match straceParenthesis "[][(){}]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 syn match straceSysCall "^\w\+"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 syn match straceOtherPID "^\[[^]]*\]" contains=stracePID,straceNumber nextgroup=straceSysCallEmbed skipwhite
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 syn match straceSysCallEmbed "\w\+" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 syn keyword stracePID pid contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 syn match straceOperator "[-+=*/!%&|:,]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 syn region straceComment start="/\*" end="\*/" oneline
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 " Define the default highlighting
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34
10051
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
35 hi def link straceComment Comment
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
36 hi def link straceVerbosed Comment
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
37 hi def link stracePID PreProc
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
38 hi def link straceNumber Number
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
39 hi def link straceNumberRHS Type
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
40 hi def link straceOtherRHS Type
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
41 hi def link straceString String
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
42 hi def link straceConstant Function
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
43 hi def link straceEquals Type
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
44 hi def link straceSysCallEmbed straceSysCall
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
45 hi def link straceSysCall Statement
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
46 hi def link straceParenthesis Statement
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
47 hi def link straceOperator Normal
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
48 hi def link straceSpecialChar Special
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
49 hi def link straceOtherPID PreProc
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 let b:current_syntax = "strace"