Mercurial > vim
annotate runtime/ftplugin.vim @ 30980:eb51299c4bfc v9.0.0825
patch 9.0.0825: cannot drag an entry in the tabpage line
Commit: https://github.com/vim/vim/commit/8e0ccb6bc21a446e5c6375b7fdf200fb53a129da
Author: zeertzjq <zeertzjq@outlook.com>
Date: Tue Nov 1 18:35:27 2022 +0000
patch 9.0.0825: cannot drag an entry in the tabpage line
Problem: Cannot drag an entry in the tabpage line.
Solution: Clear dragwin instead of got_click. (closes https://github.com/vim/vim/issues/11483,
closes #11482)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 02 Nov 2022 11:18:55 +0100 |
parents | 9fe2fed9bb4b |
children | 4027cefc2aab |
rev | line source |
---|---|
27623 | 1 vim9script noclear |
7 | 2 |
27623 | 3 # Vim support file to switch on loading plugins for file types |
4 # | |
5 # Maintainer: Bram Moolenaar <Bram@vim.org> | |
27634
9fe2fed9bb4b
Update runtime files. (closes #9741)
Bram Moolenaar <Bram@vim.org>
parents:
27623
diff
changeset
|
6 # Last change: 2022 Feb 11 |
27623 | 7 |
8 if exists("g:did_load_ftplugin") | |
7 | 9 finish |
10 endif | |
27623 | 11 g:did_load_ftplugin = 1 |
7 | 12 |
13 augroup filetypeplugin | |
27623 | 14 au FileType * call LoadFTPlugin() |
27538
f37561549ec2
Update runtime files; use compiled functions
Bram Moolenaar <Bram@vim.org>
parents:
856
diff
changeset
|
15 augroup END |
856 | 16 |
27623 | 17 if exists('*LoadFTPlugin') |
18 # No need to define the function again. | |
19 finish | |
20 endif | |
21 | |
22 def LoadFTPlugin() | |
27538
f37561549ec2
Update runtime files; use compiled functions
Bram Moolenaar <Bram@vim.org>
parents:
856
diff
changeset
|
23 if exists("b:undo_ftplugin") |
27634
9fe2fed9bb4b
Update runtime files. (closes #9741)
Bram Moolenaar <Bram@vim.org>
parents:
27623
diff
changeset
|
24 # We assume b:undo_ftplugin is using legacy script syntax |
9fe2fed9bb4b
Update runtime files. (closes #9741)
Bram Moolenaar <Bram@vim.org>
parents:
27623
diff
changeset
|
25 legacy exe b:undo_ftplugin |
27538
f37561549ec2
Update runtime files; use compiled functions
Bram Moolenaar <Bram@vim.org>
parents:
856
diff
changeset
|
26 unlet! b:undo_ftplugin b:did_ftplugin |
f37561549ec2
Update runtime files; use compiled functions
Bram Moolenaar <Bram@vim.org>
parents:
856
diff
changeset
|
27 endif |
f37561549ec2
Update runtime files; use compiled functions
Bram Moolenaar <Bram@vim.org>
parents:
856
diff
changeset
|
28 |
f37561549ec2
Update runtime files; use compiled functions
Bram Moolenaar <Bram@vim.org>
parents:
856
diff
changeset
|
29 var s = expand("<amatch>") |
f37561549ec2
Update runtime files; use compiled functions
Bram Moolenaar <Bram@vim.org>
parents:
856
diff
changeset
|
30 if s != "" |
f37561549ec2
Update runtime files; use compiled functions
Bram Moolenaar <Bram@vim.org>
parents:
856
diff
changeset
|
31 if &cpo =~# "S" && exists("b:did_ftplugin") |
f37561549ec2
Update runtime files; use compiled functions
Bram Moolenaar <Bram@vim.org>
parents:
856
diff
changeset
|
32 # In compatible mode options are reset to the global values, need to |
f37561549ec2
Update runtime files; use compiled functions
Bram Moolenaar <Bram@vim.org>
parents:
856
diff
changeset
|
33 # set the local values also when a plugin was already used. |
f37561549ec2
Update runtime files; use compiled functions
Bram Moolenaar <Bram@vim.org>
parents:
856
diff
changeset
|
34 unlet b:did_ftplugin |
230 | 35 endif |
856 | 36 |
27538
f37561549ec2
Update runtime files; use compiled functions
Bram Moolenaar <Bram@vim.org>
parents:
856
diff
changeset
|
37 # When there is a dot it is used to separate filetype names. Thus for |
f37561549ec2
Update runtime files; use compiled functions
Bram Moolenaar <Bram@vim.org>
parents:
856
diff
changeset
|
38 # "aaa.bbb" load "aaa" and then "bbb". |
f37561549ec2
Update runtime files; use compiled functions
Bram Moolenaar <Bram@vim.org>
parents:
856
diff
changeset
|
39 for name in split(s, '\.') |
f37561549ec2
Update runtime files; use compiled functions
Bram Moolenaar <Bram@vim.org>
parents:
856
diff
changeset
|
40 exe 'runtime! ftplugin/' .. name .. '.vim ftplugin/' .. name .. '_*.vim ftplugin/' .. name .. '/*.vim' |
f37561549ec2
Update runtime files; use compiled functions
Bram Moolenaar <Bram@vim.org>
parents:
856
diff
changeset
|
41 endfor |
f37561549ec2
Update runtime files; use compiled functions
Bram Moolenaar <Bram@vim.org>
parents:
856
diff
changeset
|
42 endif |
f37561549ec2
Update runtime files; use compiled functions
Bram Moolenaar <Bram@vim.org>
parents:
856
diff
changeset
|
43 enddef |