annotate runtime/indent/testdir/krl.in @ 33469:34d6ba6b0a82 v9.0.1987

patch 9.0.1987: win32: font-size calculation can be improved Commit: https://github.com/vim/vim/commit/da5da654deb46a1432de26c7e02e7eba64c122f3 Author: Ken Takata <kentkt@csc.jp> Date: Thu Oct 5 20:20:58 2023 +0200 patch 9.0.1987: win32: font-size calculation can be improved Problem: win32: font-size calculation can be improved Solution: calculate font size before the window size Support calculating the new size even if a bitmap font is used. Calculate the new font size before actually change the Window size. closes: #13280 related: #11812, #13252 Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: Ken Takata <kentkt@csc.jp>
author Christian Brabandt <cb@256bit.org>
date Thu, 05 Oct 2023 20:30:10 +0200
parents f73a9bdff3a3
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
28517
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
1 ; vim: set ft=krl :
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
2
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
3 ; START_INDENT
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
4
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
5 def One()
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
6 int i
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
7 If i==1 then
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
8 While i>=1
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
9 For i=1 to 5 step 2
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
10 Loop
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
11 i = i+1
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
12 EndLoop
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
13 EndFor
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
14 EndWhile
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
15 Else
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
16 Repeat
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
17 Switch i
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
18 Case 1
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
19 Skip 123
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
20 i = i+1
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
21 EndSkip 123
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
22 Spline with $acc=100, $vel.cp=3
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
23 slin {x 100}
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
24 scirc {x 110, y 110}, {x 120, y 90}
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
25 slin {x 200} c_dis
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
26 Time_Block Start
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
27 slin {x 300} c_dis
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
28 Time_Block Part = 22.2
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
29 slin {y 400} c_dis
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
30 Time_Block Part = 33.3
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
31 Time_Block End = 10
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
32 slin {y 200} c_dis
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
33 Const_Vel Start +100 OnStart
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
34 slin {y 300} c_dis
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
35 slin {x 100}
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
36 Const_Vel End -5.5
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
37 slin {y 200} c_dis
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
38 EndSpline
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
39 Case 2,3
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
40 PTP_Spline with $acc=100, $vel.ptp=100
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
41 sptp {a1 0} c_ptp
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
42 sptp {a1 90}
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
43 EndSpline c_spl
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
44 Default
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
45 i = i+1
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
46 EndSwitch
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
47 Continue
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
48 Until False
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
49 EndIf
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
50 end
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
51
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
52 DEF Two()
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
53 int i
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
54 END
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
55
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
56 global def Three()
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
57 int i
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
58 end
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
59
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
60 GLOBAL DEF Four()
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
61 int i
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
62 END
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
63
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
64 Global Def Five()
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
65 int i
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
66 End
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
67
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
68 deffct bool fOne()
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
69 int i
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
70 endfct
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
71
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
72 DEFFCT bool fTwo()
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
73 int i
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
74 ENDFCT
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
75
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
76 global deffct bool fThree()
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
77 int i
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
78 endfct
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
79
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
80 GLOBAL DEFFCT bool fFour()
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
81 int i
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
82 ENDFCT
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
83
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
84 Global DefFct bool fFive()
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
85 int i
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
86 EndFct
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
87
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
88 DefDat datfile()
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
89 global int i=1
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
90 ; don't indent column 1 comments unless g:krlCommentIndent is set
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
91 ; global int o=2
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
92 EndDat
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
93
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
94 ; END_INDENT
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
95
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
96 ; START_INDENT
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
97 ; INDENT_EXE let g:krlSpaceIndent = 0
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
98 ; INDENT_EXE set shiftwidth=4
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
99
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
100 def bla()
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
101 int i
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
102 end
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
103
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
104 ; END_INDENT
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
105
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
106 ; START_INDENT
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
107 ; INDENT_EXE let g:krlCommentIndent = 1
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
108 def bla()
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
109 ; indent this first column comment because of g:krlCommentIndent=1
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
110 end
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
111 ; END_INDENT
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
112
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
113 ; START_INDENT
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
114 ; INDENT_EXE let g:krlIndentBetweenDef = 0
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
115 def bla()
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
116 int i ; don't indent this line because of g:krlIndentBetweenDef=0
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
117 end
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
118 ; END_INDENT
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
119
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
120 ; START_INDENT
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
121 ; INDENT_AT this-line
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
122 def Some()
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
123 int f
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
124 if true then
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
125 f = 1 ; this-line
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
126 endif
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
127 end
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
128 ; END_INDENT
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
129
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
130 ; START_INDENT
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
131 ; INDENT_NEXT next-line
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
132 def Some()
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
133 int i
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
134 ; next-line
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
135 i = 1 ; should get indent of line 'int i' above
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
136 end
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
137 ; END_INDENT
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
138
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
139 ; START_INDENT
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
140 ; INDENT_PREV prev-line
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
141 def Some()
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
142 int f
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
143 if true then
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
144 f = 1
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
145 ; prev-line
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
146 endif
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
147 end
f73a9bdff3a3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
148 ; END_INDENT