annotate runtime/delmenu.vim @ 33732:b140246564f4 v9.0.2095

patch 9.0.2095: statusline may look different than expected Commit: https://github.com/vim/vim/commit/6a650bf696f1df3214b3d788947447c5bbf1a77d Author: Christian Brabandt <cb@256bit.org> Date: Wed Nov 8 21:23:29 2023 +0100 patch 9.0.2095: statusline may look different than expected Problem: statusline may look different than expected Solution: do not check for highlighting of stl and stlnc characters statusline fillchar may be different than expected If the highlighting group for the statusline for the current window |hl-StatusLine| or the non-current window |hl-StatusLineNC| are cleared (or do not differ from each other), than Vim will use the hard-coded fallback values '^' (for the non-current windows) or '=' (for the current window). I believe this was done, to make sure the statusline will always be visible and be distinguishable from the rest of the window. However, this may be unexpected, if a user explicitly defined those fillchar characters just to notice that those values are then not used by Vim. So, let's assume users know what they are doing and just always return the configured stl and stlnc values. And if they want the statusline to be non-distinguishable from the rest of the window space, so be it. It is their responsibility and Vim shall not know better what to use. fixes: #13366 closes: #13488 Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Wed, 08 Nov 2023 21:30:04 +0100
parents 4027cefc2aab
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 " This Vim script deletes all the menus, so that they can be redefined.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Warning: This also deletes all menus defined by the user!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 "
32770
4027cefc2aab Farewell to Bram and dedicate upcoming Vim 9.1 to him (#12749)
Christian Brabandt <cb@256bit.org>
parents: 29601
diff changeset
4 " Maintainer: The Vim Project <https://github.com/vim/vim>
4027cefc2aab Farewell to Bram and dedicate upcoming Vim 9.1 to him (#12749)
Christian Brabandt <cb@256bit.org>
parents: 29601
diff changeset
5 " Last Change: 2023 Aug 10
4027cefc2aab Farewell to Bram and dedicate upcoming Vim 9.1 to him (#12749)
Christian Brabandt <cb@256bit.org>
parents: 29601
diff changeset
6 " Former Maintainer: Bram Moolenaar <Bram@vim.org>
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 aunmenu *
14952
405309f9dd13 patch 8.1.0487: no menus specifically for the terminal window
Bram Moolenaar <Bram@vim.org>
parents: 7
diff changeset
9 tlunmenu *
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10
29601
8f0ca93857a6 patch 9.0.0141: "delmenu" does not remove autocmmands
Bram Moolenaar <Bram@vim.org>
parents: 18860
diff changeset
11 if exists('#SetupLazyloadMenus')
8f0ca93857a6 patch 9.0.0141: "delmenu" does not remove autocmmands
Bram Moolenaar <Bram@vim.org>
parents: 18860
diff changeset
12 au! SetupLazyloadMenus
8f0ca93857a6 patch 9.0.0141: "delmenu" does not remove autocmmands
Bram Moolenaar <Bram@vim.org>
parents: 18860
diff changeset
13 augroup! SetupLazyloadMenus
8f0ca93857a6 patch 9.0.0141: "delmenu" does not remove autocmmands
Bram Moolenaar <Bram@vim.org>
parents: 18860
diff changeset
14 endif
8f0ca93857a6 patch 9.0.0141: "delmenu" does not remove autocmmands
Bram Moolenaar <Bram@vim.org>
parents: 18860
diff changeset
15
8f0ca93857a6 patch 9.0.0141: "delmenu" does not remove autocmmands
Bram Moolenaar <Bram@vim.org>
parents: 18860
diff changeset
16 if exists('#buffer_list')
8f0ca93857a6 patch 9.0.0141: "delmenu" does not remove autocmmands
Bram Moolenaar <Bram@vim.org>
parents: 18860
diff changeset
17 au! buffer_list
8f0ca93857a6 patch 9.0.0141: "delmenu" does not remove autocmmands
Bram Moolenaar <Bram@vim.org>
parents: 18860
diff changeset
18 augroup! buffer_list
8f0ca93857a6 patch 9.0.0141: "delmenu" does not remove autocmmands
Bram Moolenaar <Bram@vim.org>
parents: 18860
diff changeset
19 endif
8f0ca93857a6 patch 9.0.0141: "delmenu" does not remove autocmmands
Bram Moolenaar <Bram@vim.org>
parents: 18860
diff changeset
20
8f0ca93857a6 patch 9.0.0141: "delmenu" does not remove autocmmands
Bram Moolenaar <Bram@vim.org>
parents: 18860
diff changeset
21 if exists('#LoadBufferMenu')
8f0ca93857a6 patch 9.0.0141: "delmenu" does not remove autocmmands
Bram Moolenaar <Bram@vim.org>
parents: 18860
diff changeset
22 au! LoadBufferMenu
8f0ca93857a6 patch 9.0.0141: "delmenu" does not remove autocmmands
Bram Moolenaar <Bram@vim.org>
parents: 18860
diff changeset
23 augroup! LoadBufferMenu
8f0ca93857a6 patch 9.0.0141: "delmenu" does not remove autocmmands
Bram Moolenaar <Bram@vim.org>
parents: 18860
diff changeset
24 endif
8f0ca93857a6 patch 9.0.0141: "delmenu" does not remove autocmmands
Bram Moolenaar <Bram@vim.org>
parents: 18860
diff changeset
25
8f0ca93857a6 patch 9.0.0141: "delmenu" does not remove autocmmands
Bram Moolenaar <Bram@vim.org>
parents: 18860
diff changeset
26 if exists('#spellmenu')
8f0ca93857a6 patch 9.0.0141: "delmenu" does not remove autocmmands
Bram Moolenaar <Bram@vim.org>
parents: 18860
diff changeset
27 au! spellmenu
8f0ca93857a6 patch 9.0.0141: "delmenu" does not remove autocmmands
Bram Moolenaar <Bram@vim.org>
parents: 18860
diff changeset
28 augroup! spellmenu
8f0ca93857a6 patch 9.0.0141: "delmenu" does not remove autocmmands
Bram Moolenaar <Bram@vim.org>
parents: 18860
diff changeset
29 endif
8f0ca93857a6 patch 9.0.0141: "delmenu" does not remove autocmmands
Bram Moolenaar <Bram@vim.org>
parents: 18860
diff changeset
30
8f0ca93857a6 patch 9.0.0141: "delmenu" does not remove autocmmands
Bram Moolenaar <Bram@vim.org>
parents: 18860
diff changeset
31 if exists('#SpellPopupMenu')
8f0ca93857a6 patch 9.0.0141: "delmenu" does not remove autocmmands
Bram Moolenaar <Bram@vim.org>
parents: 18860
diff changeset
32 au! SpellPopupMenu
8f0ca93857a6 patch 9.0.0141: "delmenu" does not remove autocmmands
Bram Moolenaar <Bram@vim.org>
parents: 18860
diff changeset
33 augroup! SpellPopupMenu
8f0ca93857a6 patch 9.0.0141: "delmenu" does not remove autocmmands
Bram Moolenaar <Bram@vim.org>
parents: 18860
diff changeset
34 endif
8f0ca93857a6 patch 9.0.0141: "delmenu" does not remove autocmmands
Bram Moolenaar <Bram@vim.org>
parents: 18860
diff changeset
35
18860
ec92ccff5c8b patch 8.1.2416: loading menus sets v:errmsg
Bram Moolenaar <Bram@vim.org>
parents: 18053
diff changeset
36 unlet! g:did_install_default_menus
ec92ccff5c8b patch 8.1.2416: loading menus sets v:errmsg
Bram Moolenaar <Bram@vim.org>
parents: 18053
diff changeset
37 unlet! g:did_install_syntax_menu
ec92ccff5c8b patch 8.1.2416: loading menus sets v:errmsg
Bram Moolenaar <Bram@vim.org>
parents: 18053
diff changeset
38
ec92ccff5c8b patch 8.1.2416: loading menus sets v:errmsg
Bram Moolenaar <Bram@vim.org>
parents: 18053
diff changeset
39 if exists('g:did_menu_trans')
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 menutrans clear
18860
ec92ccff5c8b patch 8.1.2416: loading menus sets v:errmsg
Bram Moolenaar <Bram@vim.org>
parents: 18053
diff changeset
41 unlet g:did_menu_trans
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43
18860
ec92ccff5c8b patch 8.1.2416: loading menus sets v:errmsg
Bram Moolenaar <Bram@vim.org>
parents: 18053
diff changeset
44 unlet! g:find_help_dialog
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45
18860
ec92ccff5c8b patch 8.1.2416: loading menus sets v:errmsg
Bram Moolenaar <Bram@vim.org>
parents: 18053
diff changeset
46 unlet! g:menutrans_fileformat_choices
ec92ccff5c8b patch 8.1.2416: loading menus sets v:errmsg
Bram Moolenaar <Bram@vim.org>
parents: 18053
diff changeset
47 unlet! g:menutrans_fileformat_dialog
ec92ccff5c8b patch 8.1.2416: loading menus sets v:errmsg
Bram Moolenaar <Bram@vim.org>
parents: 18053
diff changeset
48 unlet! g:menutrans_help_dialog
ec92ccff5c8b patch 8.1.2416: loading menus sets v:errmsg
Bram Moolenaar <Bram@vim.org>
parents: 18053
diff changeset
49 unlet! g:menutrans_no_file
ec92ccff5c8b patch 8.1.2416: loading menus sets v:errmsg
Bram Moolenaar <Bram@vim.org>
parents: 18053
diff changeset
50 unlet! g:menutrans_path_dialog
ec92ccff5c8b patch 8.1.2416: loading menus sets v:errmsg
Bram Moolenaar <Bram@vim.org>
parents: 18053
diff changeset
51 unlet! g:menutrans_set_lang_to
ec92ccff5c8b patch 8.1.2416: loading menus sets v:errmsg
Bram Moolenaar <Bram@vim.org>
parents: 18053
diff changeset
52 unlet! g:menutrans_spell_add_ARG_to_word_list
ec92ccff5c8b patch 8.1.2416: loading menus sets v:errmsg
Bram Moolenaar <Bram@vim.org>
parents: 18053
diff changeset
53 unlet! g:menutrans_spell_change_ARG_to
ec92ccff5c8b patch 8.1.2416: loading menus sets v:errmsg
Bram Moolenaar <Bram@vim.org>
parents: 18053
diff changeset
54 unlet! g:menutrans_spell_ignore_ARG
ec92ccff5c8b patch 8.1.2416: loading menus sets v:errmsg
Bram Moolenaar <Bram@vim.org>
parents: 18053
diff changeset
55 unlet! g:menutrans_tags_dialog
ec92ccff5c8b patch 8.1.2416: loading menus sets v:errmsg
Bram Moolenaar <Bram@vim.org>
parents: 18053
diff changeset
56 unlet! g:menutrans_textwidth_dialog
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 " vim: set sw=2 :