annotate runtime/syntax/tar.vim @ 33872:2c5ae1ce5af2 v9.0.2146

patch 9.0.2146: text-property without type errors when joining Commit: https://github.com/vim/vim/commit/0d0b3b19517c321b089d637919e88e49a07a3d85 Author: Christian Brabandt <cb@256bit.org> Date: Sun Dec 3 17:56:43 2023 +0100 patch 9.0.2146: text-property without type errors when joining Problem: text-property without type errors when joining Solution: count all text-properties, with or without type before joining lines Error when joining lines with text properties without a proper type When joining lines, we need to consider all text properties that are attached to a line, even when those text properties are invalid and do not have a type attached to them. However, since patch v9.0.0993 (commit: 89469d157aea01513bde826b4519dd6b5fbceae4) those text properties won't be counted when joining lines and therefore this will cause the adjustment for text properties on joining to go wrong (and may later cause SIGABRT with an invalid free pointer) I am not sure, why the condition to not count text properties with a valid type was added in patch v9.0.993, because no test fails if those condition is removed. So let's just remove this condition and add a test that verifies, that we are able to join lines, even when the text properties attached to it do not have a valid type. fixes: #13609 closes: #13614 Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Sun, 10 Dec 2023 15:16:11 +0100
parents 1e9e9d89f0ee
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
446
7472c565592a updated for version 7.0117
vimboss
parents:
diff changeset
1 " Language : Tar Listing Syntax
7472c565592a updated for version 7.0117
vimboss
parents:
diff changeset
2 " Maintainer : Bram Moolenaar
7472c565592a updated for version 7.0117
vimboss
parents:
diff changeset
3 " Last change: Sep 08, 2004
7472c565592a updated for version 7.0117
vimboss
parents:
diff changeset
4
7472c565592a updated for version 7.0117
vimboss
parents:
diff changeset
5 if exists("b:current_syntax")
7472c565592a updated for version 7.0117
vimboss
parents:
diff changeset
6 finish
7472c565592a updated for version 7.0117
vimboss
parents:
diff changeset
7 endif
7472c565592a updated for version 7.0117
vimboss
parents:
diff changeset
8
7472c565592a updated for version 7.0117
vimboss
parents:
diff changeset
9 syn match tarComment '^".*' contains=tarFilename
7472c565592a updated for version 7.0117
vimboss
parents:
diff changeset
10 syn match tarFilename 'tarfile \zs.*' contained
7472c565592a updated for version 7.0117
vimboss
parents:
diff changeset
11 syn match tarDirectory '.*/$'
7472c565592a updated for version 7.0117
vimboss
parents:
diff changeset
12
7472c565592a updated for version 7.0117
vimboss
parents:
diff changeset
13 hi def link tarComment Comment
7472c565592a updated for version 7.0117
vimboss
parents:
diff changeset
14 hi def link tarFilename Constant
7472c565592a updated for version 7.0117
vimboss
parents:
diff changeset
15 hi def link tarDirectory Type
7472c565592a updated for version 7.0117
vimboss
parents:
diff changeset
16
29193
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 446
diff changeset
17 let b:current_syntax = 'tar'
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 446
diff changeset
18
446
7472c565592a updated for version 7.0117
vimboss
parents:
diff changeset
19 " vim: ts=8