annotate vimtutor.com @ 21564:30a997217524 v8.2.1332

patch 8.2.1332: Vim9: memory leak when using nested global function Commit: https://github.com/vim/vim/commit/ce6583568ff5b3e0e6438b37ede2c80bedffba10 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Jul 31 23:47:12 2020 +0200 patch 8.2.1332: Vim9: memory leak when using nested global function Problem: Vim9: memory leak when using nested global function. Solution: Delete the function when deleting the instruction. Disable test that still causes a leak.
author Bram Moolenaar <Bram@vim.org>
date Sat, 01 Aug 2020 00:00:11 +0200
parents 6f55637de261
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 $ !
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 $ !=====================================================================
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 $ !
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 $ ! VimTutor.com version 29-Aug-2002
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 $ !
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 $ ! Author: Tom Wyant <Thomas.R.Wyant-III@usa.dupont.com>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 $ !
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 $ ! This DCL command procedure executes the vimtutor command
6719
6f55637de261 updated for version 7.4.683
Bram Moolenaar <bram@vim.org>
parents: 4352
diff changeset
9 $ ! (surprise, surprise!) which gives you a brief tutorial on the
6f55637de261 updated for version 7.4.683
Bram Moolenaar <bram@vim.org>
parents: 4352
diff changeset
10 $ ! VIM editor. Languages other than the default are supported in
6f55637de261 updated for version 7.4.683
Bram Moolenaar <bram@vim.org>
parents: 4352
diff changeset
11 $ ! the usual way, as are at least some of the command qualifiers,
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 $ ! though you'll need to play some fairly serious games with DCL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 $ ! to specify ones that need quoting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 $ !
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 $ ! Copyright (c) 2002 E. I. DuPont de Nemours and Company, Inc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 $ !
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 $ ! This program is free software; you can redistribute it and/or
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 $ ! modify it under the terms of the VIM license as available from
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 $ ! the vim 6.1 ":help license" command or (at your option) the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 $ ! license from any later version of vim.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 $ !
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 $ ! This program is distributed in the hope that it will be useful,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 $ ! but WITHOUT ANY WARRANTY; without even the implied warranty of
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 $ ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 $ !
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 $ !=====================================================================
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 $ !
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 $ !
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 $ ! Check for the existence of VIM, and die if it isn't there.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 $ !
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 $ if f$search ("vim:vim.exe") .eqs. ""
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 $ then
4352
04736b4030ec updated for version 7.3.925
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
33 $ write sys$error "Error - Can't run tutorial. VIM not found."
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 $ exit
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 $ endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 $ !
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 $ !
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 $ ! Pick up the argument, if any.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 $ !
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 $ inx = 0
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 $ arg_loop:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 $ inx = inx + 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 $ if f$type (p'inx') .nes. ""
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 $ then
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 $ if p'inx' .nes. "" .and. f$locate ("-", p'inx') .ne. 0
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 $ then
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 $ xx = p'inx'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 $ assign/nolog "''xx'" xx
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 $ p'inx' = ""
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 $ endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 $ goto arg_loop
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 $ endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 $ !
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 $ !
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 $ ! Make sure we clean up our toys when we're through playing.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 $ !
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 $ on error then goto exit
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 $ !
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 $ !
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 $ ! Create the VIM foreign command if needed
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 $ !
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 $ if f$type (vim) .eqs. "" then vim := $vim:vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 $ !
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 $ !
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 $ ! Build the name for our temp file.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 $ !
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 $ tutfil = "sys$login:vimtutor_" + -
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 f$edit (f$getjpi (0, "pid"), "trim") + "."
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 $ assign/nolog 'tutfil' TUTORCOPY
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 $ !
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 $ !
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 $ ! Copy the selected file to the temp file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 $ !
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 $ assign/nolog/user nla0: sys$error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 $ assign/nolog/user nla0: sys$output
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 $ vim -u "NONE" -c "so $VIMRUNTIME/tutor/tutor.vim"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 $ !
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 $ !
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 $ ! Run the tutorial
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 $ !
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 $ assign/nolog/user sys$command sys$input
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 $ vim -u "NONE" -c "set nocp" 'p1' 'p2' 'p3' 'p4' 'p5' 'p6' 'p7' 'p8' 'tutfil'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 $ !
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 $ !
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 $ ! Ditch the copy.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 $ !
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 $ exit:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 $ if f$type (tutfil) .nes. "" .and. f$search (tutfil) .nes. "" then -
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 $ delete 'tutfil';*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 $ if f$type (xx) .nes. "" then deassign xx
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 $ deassign TUTORCOPY
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 $ exit
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 $ !
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94 $ !=====================================================================
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95 $ !
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96 $ ! Modification history
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97 $ !
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98 $ ! 29-Aug-2002 T. R. Wyant
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99 $ ! Changed license to vim.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100 $ ! Fix error "input is not from a terminal"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101 $ ! Juggle documentation (copyright and contact to front,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102 $ ! modification history to end).
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103 $ ! 25-Jul-2002 T. R. Wyant
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104 $ ! Initial version