Patch 8.2.4891

7 views
Skip to first unread message

Bram Moolenaar

unread,
May 6, 2022, 11:33:19 AM5/6/22
to vim...@googlegroups.com

Patch 8.2.4891
Problem: Vim help presentation could be better.
Solution: Add an imported file for extra Vim help support. Show highlight
names in the color they have.
Files: Filelist, runtime/import/dist/vimhelp.vim


*** ../vim-8.2.4890/Filelist 2022-04-03 18:01:39.647574472 +0100
--- Filelist 2022-05-01 19:02:26.133792911 +0100
***************
*** 722,727 ****
--- 722,728 ----
runtime/doc/xxd.1 \
runtime/ftoff.vim \
runtime/gvimrc_example.vim \
+ runtime/import/dist/vimhelp.vim \
runtime/macros/README.txt \
runtime/macros/editexisting.vim \
runtime/macros/hanoi/click.me \
*** ../vim-8.2.4890/runtime/import/dist/vimhelp.vim 1970-01-01 00:00:00.000000000 +0000
--- runtime/import/dist/vimhelp.vim 2022-05-01 19:05:11.138372772 +0100
***************
*** 0 ****
--- 1,21 ----
+ vim9script
+
+ # Extra functionality for displaying Vim help .
+
+ # Called when editing the doc/syntax.txt file
+ export def HighlightGroups()
+ var buf: number = bufnr('%')
+ var lnum: number = search('\*highlight-groups\*', 'cn')
+ 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
+ endwhile
+ enddef
*** ../vim-8.2.4890/src/version.c 2022-05-06 16:18:37.129781976 +0100
--- src/version.c 2022-05-06 16:31:16.761564439 +0100
***************
*** 748,749 ****
--- 748,751 ----
{ /* Add new patch number below this line */
+ /**/
+ 4891,
/**/

--
"A clear conscience is usually the sign of a bad memory."
-- Steven Wright

/// 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 ///
Reply all
Reply to author
Forward
0 new messages