Skip to content

Commit 1dd1e16

Browse files
committed
.
1 parent 6663b4e commit 1dd1e16

File tree

2 files changed

+33
-76
lines changed

2 files changed

+33
-76
lines changed

LICENSE

Lines changed: 25 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -1,78 +1,29 @@
1-
VIM LICENSE
1+
BSD 3-Clause License
22

3-
I) There are no restrictions on distributing unmodified copies of Vim except
4-
that they must include this license text. You can also distribute
5-
unmodified parts of Vim, likewise unrestricted except that they must
6-
include this license text. You are also allowed to include executables
7-
that you made from the unmodified Vim sources, plus your own usage
8-
examples and Vim scripts.
3+
Copyright (c) 2023, Ubaldo Tiberi.
4+
All rights reserved.
95

10-
II) It is allowed to distribute a modified (or extended) version of Vim,
11-
including executables and/or source code, when the following four
12-
conditions are met:
13-
1) This license text must be included unmodified.
14-
2) The modified Vim must be distributed in one of the following five ways:
15-
a) If you make changes to Vim yourself, you must clearly describe in
16-
the distribution how to contact you. When the maintainer asks you
17-
(in any way) for a copy of the modified Vim you distributed, you
18-
must make your changes, including source code, available to the
19-
maintainer without fee. The maintainer reserves the right to
20-
include your changes in the official version of Vim. What the
21-
maintainer will do with your changes and under what license they
22-
will be distributed is negotiable. If there has been no negotiation
23-
then this license, or a later version, also applies to your changes.
24-
The current maintainer is Bram Moolenaar <[email protected]>. If this
25-
changes it will be announced in appropriate places (most likely
26-
vim.sf.net, www.vim.org and/or comp.editors). When it is completely
27-
impossible to contact the maintainer, the obligation to send him
28-
your changes ceases. Once the maintainer has confirmed that he has
29-
received your changes they will not have to be sent again.
30-
b) If you have received a modified Vim that was distributed as
31-
mentioned under a) you are allowed to further distribute it
32-
unmodified, as mentioned at I). If you make additional changes the
33-
text under a) applies to those changes.
34-
c) Provide all the changes, including source code, with every copy of
35-
the modified Vim you distribute. This may be done in the form of a
36-
context diff. You can choose what license to use for new code you
37-
add. The changes and their license must not restrict others from
38-
making their own changes to the official version of Vim.
39-
d) When you have a modified Vim which includes changes as mentioned
40-
under c), you can distribute it without the source code for the
41-
changes if the following three conditions are met:
42-
- The license that applies to the changes permits you to distribute
43-
the changes to the Vim maintainer without fee or restriction, and
44-
permits the Vim maintainer to include the changes in the official
45-
version of Vim without fee or restriction.
46-
- You keep the changes for at least three years after last
47-
distributing the corresponding modified Vim. When the maintainer
48-
or someone who you distributed the modified Vim to asks you (in
49-
any way) for the changes within this period, you must make them
50-
available to him.
51-
- You clearly describe in the distribution how to contact you. This
52-
contact information must remain valid for at least three years
53-
after last distributing the corresponding modified Vim, or as long
54-
as possible.
55-
e) When the GNU General Public License (GPL) applies to the changes,
56-
you can distribute the modified Vim under the GNU GPL version 2 or
57-
any later version.
58-
3) A message must be added, at least in the output of the ":version"
59-
command and in the intro screen, such that the user of the modified Vim
60-
is able to see that it was modified. When distributing as mentioned
61-
under 2)e) adding the message is only required for as far as this does
62-
not conflict with the license used for the changes.
63-
4) The contact information as required under 2)a) and 2)d) must not be
64-
removed or changed, except that the person himself can make
65-
corrections.
6+
Redistribution and use in source and binary forms, with or without
7+
modification, are permitted provided that the following conditions are met:
668

67-
III) If you distribute a modified version of Vim, you are encouraged to use
68-
the Vim license for your changes and make them available to the
69-
maintainer, including the source code. The preferred way to do this is
70-
by e-mail or by uploading the files to a server and e-mailing the URL.
71-
If the number of changes is small (e.g., a modified Makefile) e-mailing a
72-
context diff will do. The e-mail address to be used is
73-
9+
* Redistributions of source code must retain the above copyright notice, this
10+
list of conditions and the following disclaimer.
7411

75-
IV) It is not allowed to remove this license from the distribution of the Vim
76-
sources, parts of it or from a modified version. You may use this
77-
license for previous Vim releases instead of the license that they came
78-
with, at your option.
12+
* Redistributions in binary form must reproduce the above copyright notice,
13+
this list of conditions and the following disclaimer in the documentation
14+
and/or other materials provided with the distribution.
15+
16+
* Neither the name of the copyright holder nor the names of its
17+
contributors may be used to endorse or promote products derived from
18+
this software without specific prior written permission.
19+
20+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

plugin/hlyanked.vim

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,13 @@ def HighlightYanked()
4040
var l0 = line("'[")
4141
var c0 = col("'[")
4242
var l1 = line("']")
43-
var c1 = col("']")
43+
44+
var delta = 0
45+
if l0 == l1
46+
delta = len(v:event.regcontents[-1]) - (col("']") - c0)
47+
endif
48+
49+
var c1 = col("']") + delta
4450

4551
# For understanding the following regex read :h \% and mind that \_.* are
4652
# all characters including new lines.
@@ -58,7 +64,7 @@ enddef
5864

5965
augroup HighlightYanked
6066
autocmd!
61-
autocmd TextYankPost * if v:event.operator == 'y'
67+
autocmd TextYankPost * if !v:event.visual && v:event.operator == 'y' && !empty(v:event.regtype)
6268
| HighlightYanked()
6369
| endif
6470
augroup END

0 commit comments

Comments
 (0)