Mercurial > vim
annotate LICENSE @ 32724:83111104fb89
Update the vimscript code for restoring cursor position
Commit: https://github.com/vim/vim/commit/81b8bf5b4a33552c610dc2ea743ac2698a16aef7
Author: Dragan Simic' via vim_dev <vim_dev@googlegroups.com>
Date: Wed Aug 9 17:23:58 2023 +0200
Update the vimscript code for restoring cursor position
Using xxd(1) to filter and edit binary files causes the input files
to have dual nature, so to speak, which effectively makes restoring
the cursor position broken. Fix that by ignoring the "xxd" file type
in the code that restores the cursor position.
Interactive rebasing in git causes files to be edited in vim, which,
similarly to commit messages, are rarely the same as the last one
edited. Thus, also add "gitrebase" to the list of file types for
which the cursor position isn't restored.
While there, refactor the code a bit to possibly save a few CPU cycles
and to keep the line lengths in check, and use the long form of the
commands and variables, to make the code slightly more consistent and
more understandable to newcomers.
Update the relevant comments in the code and the associated parts of
the documentation, to keep them in sync with the updated code.
Remove some redundant trailing whitespace as well, as spotted.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 10 Aug 2023 07:00:04 +0200 |
parents | 9185ddf4cded |
children | 4027cefc2aab |
rev | line source |
---|---|
19089
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
1 VIM LICENSE |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
2 |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
3 I) There are no restrictions on distributing unmodified copies of Vim except |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
4 that they must include this license text. You can also distribute |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
5 unmodified parts of Vim, likewise unrestricted except that they must |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
6 include this license text. You are also allowed to include executables |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
7 that you made from the unmodified Vim sources, plus your own usage |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
8 examples and Vim scripts. |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
9 |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
10 II) It is allowed to distribute a modified (or extended) version of Vim, |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
11 including executables and/or source code, when the following four |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
12 conditions are met: |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
13 1) This license text must be included unmodified. |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
14 2) The modified Vim must be distributed in one of the following five ways: |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
15 a) If you make changes to Vim yourself, you must clearly describe in |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
16 the distribution how to contact you. When the maintainer asks you |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
17 (in any way) for a copy of the modified Vim you distributed, you |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
18 must make your changes, including source code, available to the |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
19 maintainer without fee. The maintainer reserves the right to |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
20 include your changes in the official version of Vim. What the |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
21 maintainer will do with your changes and under what license they |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
22 will be distributed is negotiable. If there has been no negotiation |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
23 then this license, or a later version, also applies to your changes. |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
24 The current maintainer is Bram Moolenaar <Bram@vim.org>. If this |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
25 changes it will be announced in appropriate places (most likely |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
26 vim.sf.net, www.vim.org and/or comp.editors). When it is completely |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
27 impossible to contact the maintainer, the obligation to send him |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
28 your changes ceases. Once the maintainer has confirmed that he has |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
29 received your changes they will not have to be sent again. |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
30 b) If you have received a modified Vim that was distributed as |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
31 mentioned under a) you are allowed to further distribute it |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
32 unmodified, as mentioned at I). If you make additional changes the |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
33 text under a) applies to those changes. |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
34 c) Provide all the changes, including source code, with every copy of |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
35 the modified Vim you distribute. This may be done in the form of a |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
36 context diff. You can choose what license to use for new code you |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
37 add. The changes and their license must not restrict others from |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
38 making their own changes to the official version of Vim. |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
39 d) When you have a modified Vim which includes changes as mentioned |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
40 under c), you can distribute it without the source code for the |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
41 changes if the following three conditions are met: |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
42 - The license that applies to the changes permits you to distribute |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
43 the changes to the Vim maintainer without fee or restriction, and |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
44 permits the Vim maintainer to include the changes in the official |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
45 version of Vim without fee or restriction. |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
46 - You keep the changes for at least three years after last |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
47 distributing the corresponding modified Vim. When the maintainer |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
48 or someone who you distributed the modified Vim to asks you (in |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
49 any way) for the changes within this period, you must make them |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
50 available to him. |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
51 - You clearly describe in the distribution how to contact you. This |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
52 contact information must remain valid for at least three years |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
53 after last distributing the corresponding modified Vim, or as long |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
54 as possible. |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
55 e) When the GNU General Public License (GPL) applies to the changes, |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
56 you can distribute the modified Vim under the GNU GPL version 2 or |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
57 any later version. |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
58 3) A message must be added, at least in the output of the ":version" |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
59 command and in the intro screen, such that the user of the modified Vim |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
60 is able to see that it was modified. When distributing as mentioned |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
61 under 2)e) adding the message is only required for as far as this does |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
62 not conflict with the license used for the changes. |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
63 4) The contact information as required under 2)a) and 2)d) must not be |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
64 removed or changed, except that the person himself can make |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
65 corrections. |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
66 |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
67 III) If you distribute a modified version of Vim, you are encouraged to use |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
68 the Vim license for your changes and make them available to the |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
69 maintainer, including the source code. The preferred way to do this is |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
70 by e-mail or by uploading the files to a server and e-mailing the URL. |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
71 If the number of changes is small (e.g., a modified Makefile) e-mailing a |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
72 context diff will do. The e-mail address to be used is |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
73 <maintainer@vim.org> |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
74 |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
75 IV) It is not allowed to remove this license from the distribution of the Vim |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
76 sources, parts of it or from a modified version. You may use this |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
77 license for previous Vim releases instead of the license that they came |
9185ddf4cded
patch 8.2.0105: Vim license not easy to find on github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
78 with, at your option. |