Patch 8.2.4942
Problem: Error when setting 'filetype' in help file again.
Solution: Deal with text property type already existing. (closes #10409)
Files: runtime/import/dist/vimhelp.vim
*** ../vim-8.2.4941/runtime/import/dist/vimhelp.vim 2022-05-06 16:32:21.569543796 +0100
--- runtime/import/dist/vimhelp.vim 2022-05-12 17:20:47.699437843 +0100
***************
*** 9,19 ****
while getline(lnum) !~ '===' && lnum < line('$')
var word: string = getline(lnum)->matchstr('^\w\+\ze\t')
if word->hlexists()
! prop_type_add('help-hl-' .. word, {
! bufnr: buf,
! highlight: word,
! combine: false,
! })
prop_add(lnum, 1, {length: word->strlen(), type: 'help-hl-' .. word})
endif
++lnum
--- 9,25 ----
while getline(lnum) !~ '===' && lnum < line('$')
var word: string = getline(lnum)->matchstr('^\w\+\ze\t')
if word->hlexists()
! var name = 'help-hl-' .. word
! if prop_type_list({bufnr: buf})->match(name) == -1
! prop_type_add('help-hl-' .. word, {
! bufnr: buf,
! highlight: word,
! combine: false,
! })
! else
! # was called before, delete existing properties
! prop_remove({type: name, bufnr: buf})
! endif
prop_add(lnum, 1, {length: word->strlen(), type: 'help-hl-' .. word})
endif
++lnum
*** ../vim-8.2.4941/src/version.c 2022-05-12 15:39:27.815703293 +0100
--- src/version.c 2022-05-12 17:17:10.059455707 +0100
***************
*** 748,749 ****
--- 748,751 ----
{ /* Add new patch number below this line */
+ /**/
+ 4942,
/**/
--
hundred-and-one symptoms of being an internet addict:
177. You log off of your system because it's time to go to work.
/// Bram Moolenaar -- Br...@Moolenaar.net --
http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features --
http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims --
http://ICCF-Holland.org ///