annotate runtime/ftplugin/qml.vim @ 34571:fdd232ab72ea v9.1.0184

patch 9.1.0184: Cursor pos wrong when clicking with conceal and wrap Commit: https://github.com/vim/vim/commit/d0c1b7723f7e73763597af2f97a53d94ab7ed020 Author: zeertzjq <zeertzjq@outlook.com> Date: Sat Mar 16 15:03:33 2024 +0100 patch 9.1.0184: Cursor pos wrong when clicking with conceal and wrap Problem: Cursor position wrong when clicking with conceal and wrap. Solution: Use the virtual column of the last char for ScreenCols[] in boguscols. Remove use of MAXCOL in ScreenCols[]. Rename third argument of wlv_screen_line() to "clear_end" as that's clearer what it does (zeertzjq). related: 14192 closes: #14200 Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Sat, 16 Mar 2024 15:15:04 +0100
parents 8ae680be2a51
children 7c7432a53a6c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
34134
8ae680be2a51 runtime(ftplugin): Use "*" browsefilter pattern to match "All Files"
Christian Brabandt <cb@256bit.org>
parents: 32942
diff changeset
5 " 2023 Aug 23 by Vim Project (browsefilter)
32942
f2143ef2e979 patch 9.0.1766: Runtime: Missing QML support
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
6
f2143ef2e979 patch 9.0.1766: Runtime: Missing QML support
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
7 if exists( 'b:did_ftplugin' )
f2143ef2e979 patch 9.0.1766: Runtime: Missing QML support
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
8 finish
f2143ef2e979 patch 9.0.1766: Runtime: Missing QML support
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
9 endif
f2143ef2e979 patch 9.0.1766: Runtime: Missing QML support
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
10 let b:did_ftplugin = 1
f2143ef2e979 patch 9.0.1766: Runtime: Missing QML support
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
11
f2143ef2e979 patch 9.0.1766: Runtime: Missing QML support
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
12 let s:cpoptions_save = &cpoptions
f2143ef2e979 patch 9.0.1766: Runtime: Missing QML support
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
13 set cpoptions&vim
f2143ef2e979 patch 9.0.1766: Runtime: Missing QML support
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
14
f2143ef2e979 patch 9.0.1766: Runtime: Missing QML support
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
15 " command for undo
f2143ef2e979 patch 9.0.1766: Runtime: Missing QML support
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
16 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
17
34134
8ae680be2a51 runtime(ftplugin): Use "*" browsefilter pattern to match "All Files"
Christian Brabandt <cb@256bit.org>
parents: 32942
diff changeset
18 if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
32942
f2143ef2e979 patch 9.0.1766: Runtime: Missing QML support
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
19 let b:browsefilter =
34134
8ae680be2a51 runtime(ftplugin): Use "*" browsefilter pattern to match "All Files"
Christian Brabandt <cb@256bit.org>
parents: 32942
diff changeset
20 \ "QML Files (*.qml, *.qbs)\t*.qml;*.qbs\n"
8ae680be2a51 runtime(ftplugin): Use "*" browsefilter pattern to match "All Files"
Christian Brabandt <cb@256bit.org>
parents: 32942
diff changeset
21 if has("win32")
8ae680be2a51 runtime(ftplugin): Use "*" browsefilter pattern to match "All Files"
Christian Brabandt <cb@256bit.org>
parents: 32942
diff changeset
22 let b:browsefilter .= "All Files (*.*)\t*\n"
8ae680be2a51 runtime(ftplugin): Use "*" browsefilter pattern to match "All Files"
Christian Brabandt <cb@256bit.org>
parents: 32942
diff changeset
23 else
8ae680be2a51 runtime(ftplugin): Use "*" browsefilter pattern to match "All Files"
Christian Brabandt <cb@256bit.org>
parents: 32942
diff changeset
24 let b:browsefilter .= "All Files (*)\t*\n"
8ae680be2a51 runtime(ftplugin): Use "*" browsefilter pattern to match "All Files"
Christian Brabandt <cb@256bit.org>
parents: 32942
diff changeset
25 endif
8ae680be2a51 runtime(ftplugin): Use "*" browsefilter pattern to match "All Files"
Christian Brabandt <cb@256bit.org>
parents: 32942
diff changeset
26 let b:undo_ftplugin .= " | unlet! b:browsefilter"
32942
f2143ef2e979 patch 9.0.1766: Runtime: Missing QML support
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
27 endif
f2143ef2e979 patch 9.0.1766: Runtime: Missing QML support
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
28
f2143ef2e979 patch 9.0.1766: Runtime: Missing QML support
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
29 " 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
30 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
31 setlocal commentstring=//%s
f2143ef2e979 patch 9.0.1766: Runtime: Missing QML support
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
32
f2143ef2e979 patch 9.0.1766: Runtime: Missing QML support
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
33 setlocal formatoptions-=t
f2143ef2e979 patch 9.0.1766: Runtime: Missing QML support
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
34 setlocal formatoptions+=croql
f2143ef2e979 patch 9.0.1766: Runtime: Missing QML support
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
35
f2143ef2e979 patch 9.0.1766: Runtime: Missing QML support
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
36 let &cpoptions = s:cpoptions_save
f2143ef2e979 patch 9.0.1766: Runtime: Missing QML support
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
37 unlet s:cpoptions_save