Mercurial > vim
annotate runtime/ftplugin/qml.vim @ 33532:f99f5a56ff27 v9.0.2015
patch 9.0.2015: Vim9: does not handle islocked() from a method correctly
Commit: https://github.com/vim/vim/commit/4c8da025ef8140168b7a09d9fe922ce4bb40f19d
Author: Ernie Rael <errael@raelity.com>
Date: Wed Oct 11 21:35:11 2023 +0200
patch 9.0.2015: Vim9: does not handle islocked() from a method correctly
Problem: Vim9: does not handle islocked() from a method correctly
Solution: Handle islocked() builtin from a method.
- Setup `lval_root` from `f_islocked()`.
- Add function `fill_exec_lval_root()` to get info about executing method.
- `sync_root` added in get_lval to handle method member access.
- Conservative approach to reference counting.
closes: #13309
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ernie Rael <errael@raelity.com>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Wed, 11 Oct 2023 21:45:04 +0200 |
parents | f2143ef2e979 |
children | 8ae680be2a51 |
rev | line source |
---|---|
32942
f2143ef2e979
patch 9.0.1766: Runtime: Missing QML support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1 " Vim filetype plugin file |
f2143ef2e979
patch 9.0.1766: Runtime: Missing QML support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2 " Language: QML |
f2143ef2e979
patch 9.0.1766: Runtime: Missing QML support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
3 " Maintainer: Chase Knowlden <haroldknowlden@gmail.com> |
f2143ef2e979
patch 9.0.1766: Runtime: Missing QML support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
4 " Last Change: 2023 Aug 16 |
f2143ef2e979
patch 9.0.1766: Runtime: Missing QML support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
5 |
f2143ef2e979
patch 9.0.1766: Runtime: Missing QML support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
6 if exists( 'b:did_ftplugin' ) |
f2143ef2e979
patch 9.0.1766: Runtime: Missing QML support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
7 finish |
f2143ef2e979
patch 9.0.1766: Runtime: Missing QML support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
8 endif |
f2143ef2e979
patch 9.0.1766: Runtime: Missing QML support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
9 let b:did_ftplugin = 1 |
f2143ef2e979
patch 9.0.1766: Runtime: Missing QML support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
10 |
f2143ef2e979
patch 9.0.1766: Runtime: Missing QML support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
11 let s:cpoptions_save = &cpoptions |
f2143ef2e979
patch 9.0.1766: Runtime: Missing QML support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
12 set cpoptions&vim |
f2143ef2e979
patch 9.0.1766: Runtime: Missing QML support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
13 |
f2143ef2e979
patch 9.0.1766: Runtime: Missing QML support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
14 " command for undo |
f2143ef2e979
patch 9.0.1766: Runtime: Missing QML support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
15 let b:undo_ftplugin = "setlocal formatoptions< comments< commentstring<" |
f2143ef2e979
patch 9.0.1766: Runtime: Missing QML support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
16 |
f2143ef2e979
patch 9.0.1766: Runtime: Missing QML support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
17 if (has("gui_win32") || has("gui_gtk")) && !exists( 'b:browsefilter' ) |
f2143ef2e979
patch 9.0.1766: Runtime: Missing QML support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
18 let b:browsefilter = |
f2143ef2e979
patch 9.0.1766: Runtime: Missing QML support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
19 \ 'QML Files (*.qml,*.qbs)\t*.qml;*.qbs\n' . |
f2143ef2e979
patch 9.0.1766: Runtime: Missing QML support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
20 \ 'All Files\t*\n' |
f2143ef2e979
patch 9.0.1766: Runtime: Missing QML support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
21 endif |
f2143ef2e979
patch 9.0.1766: Runtime: Missing QML support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
22 |
f2143ef2e979
patch 9.0.1766: Runtime: Missing QML support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
23 " Set 'comments' to format dashed lists in comments. |
f2143ef2e979
patch 9.0.1766: Runtime: Missing QML support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
24 setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:// |
f2143ef2e979
patch 9.0.1766: Runtime: Missing QML support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
25 setlocal commentstring=//%s |
f2143ef2e979
patch 9.0.1766: Runtime: Missing QML support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
26 |
f2143ef2e979
patch 9.0.1766: Runtime: Missing QML support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
27 setlocal formatoptions-=t |
f2143ef2e979
patch 9.0.1766: Runtime: Missing QML support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
28 setlocal formatoptions+=croql |
f2143ef2e979
patch 9.0.1766: Runtime: Missing QML support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
29 |
f2143ef2e979
patch 9.0.1766: Runtime: Missing QML support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
30 let &cpoptions = s:cpoptions_save |
f2143ef2e979
patch 9.0.1766: Runtime: Missing QML support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
31 unlet s:cpoptions_save |