1 |
commit: a3e19f88a6734e75d245147eee9647f621fed420 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Jan 26 10:03:46 2022 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Feb 3 08:36:50 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/gentoo-syntax.git/commit/?id=a3e19f88 |
7 |
|
8 |
gentoo-common: Use eval() more consistently |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
Closes: https://github.com/gentoo/gentoo-syntax/pull/39 |
12 |
|
13 |
plugin/gentoo-common.vim | 10 ++++------ |
14 |
1 file changed, 4 insertions(+), 6 deletions(-) |
15 |
|
16 |
diff --git a/plugin/gentoo-common.vim b/plugin/gentoo-common.vim |
17 |
index 671a3c5..5c704ab 100644 |
18 |
--- a/plugin/gentoo-common.vim |
19 |
+++ b/plugin/gentoo-common.vim |
20 |
@@ -78,11 +78,11 @@ fun! GentooGetPythonTargets() |
21 |
endif |
22 |
endfor |
23 |
if len(l:py3s) ==# 1 |
24 |
- let l:impls = l:impls->add("python3_".l:py3s->join()) |
25 |
+ eval l:impls->add("python3_".l:py3s->join()) |
26 |
elseif len(l:py3s) > 1 |
27 |
let l:min = "" |
28 |
let l:max = "" |
29 |
- let l:py3s = l:py3s->sort('N') |
30 |
+ eval l:py3s->sort('N') |
31 |
for l:py in l:py3s |
32 |
if l:min ==# "" |
33 |
let l:min = l:py |
34 |
@@ -96,11 +96,9 @@ fun! GentooGetPythonTargets() |
35 |
endfor |
36 |
|
37 |
if l:max !=# "" |
38 |
- let l:impls = l:impls->add("python3_{".l:min.".." |
39 |
- \ .l:max."}") |
40 |
+ eval l:impls->add("python3_{".l:min."..".l:max."}") |
41 |
else |
42 |
- let l:impls = l:impls->add("python3_{".l:py3s |
43 |
- \ ->join(",")."}") |
44 |
+ eval l:impls->add("python3_{".l:py3s->join(",")."}") |
45 |
endif |
46 |
endif |
47 |
let l:py3 = flatten(l:impls)->join() |