Mercurial > vim
annotate runtime/import/dist/vimhelp.vim @ 29228:24b7e14d55e2 v8.2.5133
patch 8.2.5133: MacOS: build fails
Commit: https://github.com/vim/vim/commit/1f68d992cd2fd7f484fbdc14eb8a9feefe59bec8
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jun 19 17:22:49 2022 +0100
patch 8.2.5133: MacOS: build fails
Problem: MacOS: build fails.
Solution: Remove "#if 0" from timer_delete().
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 19 Jun 2022 18:30:04 +0200 |
parents | 2a1f9b4a5ac9 |
children |
rev | line source |
---|---|
28733
db38dab0e525
patch 8.2.4891: Vim help presentation could be better
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
1 vim9script |
db38dab0e525
patch 8.2.4891: Vim help presentation could be better
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
2 |
db38dab0e525
patch 8.2.4891: Vim help presentation could be better
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
3 # Extra functionality for displaying Vim help . |
db38dab0e525
patch 8.2.4891: Vim help presentation could be better
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
4 |
db38dab0e525
patch 8.2.4891: Vim help presentation could be better
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
5 # Called when editing the doc/syntax.txt file |
db38dab0e525
patch 8.2.4891: Vim help presentation could be better
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
6 export def HighlightGroups() |
29121 | 7 var save_cursor = getcurpos() |
28733
db38dab0e525
patch 8.2.4891: Vim help presentation could be better
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
8 var buf: number = bufnr('%') |
29121 | 9 |
10 var start: number = search('\*highlight-groups\*', 'c') | |
11 var end: number = search('^======') | |
12 for lnum in range(start, end) | |
13 var word: string = getline(lnum)->matchstr('^\w\+\ze\t') | |
28733
db38dab0e525
patch 8.2.4891: Vim help presentation could be better
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
14 if word->hlexists() |
29121 | 15 var type = 'help-hl-' .. word |
16 if prop_type_list({bufnr: buf})->index(type) != -1 | |
28837
64c3323117b4
patch 8.2.4942: error when setting 'filetype' in help file again
Bram Moolenaar <Bram@vim.org>
parents:
28733
diff
changeset
|
17 # was called before, delete existing properties |
29121 | 18 prop_remove({type: type, bufnr: buf}) |
19 prop_type_delete(type, {bufnr: buf}) | |
28837
64c3323117b4
patch 8.2.4942: error when setting 'filetype' in help file again
Bram Moolenaar <Bram@vim.org>
parents:
28733
diff
changeset
|
20 endif |
29121 | 21 prop_type_add(type, { |
22 bufnr: buf, | |
23 highlight: word, | |
24 combine: false, | |
25 }) | |
26 prop_add(lnum, 1, {length: word->strlen(), type: type}) | |
28733
db38dab0e525
patch 8.2.4891: Vim help presentation could be better
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
27 endif |
29121 | 28 endfor |
29 | |
30 setpos('.', save_cursor) | |
28733
db38dab0e525
patch 8.2.4891: Vim help presentation could be better
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
31 enddef |