1 |
commit: e792576ae2be0ea2ef5adf29876369f69876be9b |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Jan 26 09:59:01 2022 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Feb 3 08:36:48 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/gentoo-syntax.git/commit/?id=e792576a |
7 |
|
8 |
gentoo-common: Simplify adding other impls |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
plugin/gentoo-common.vim | 7 +++---- |
13 |
1 file changed, 3 insertions(+), 4 deletions(-) |
14 |
|
15 |
diff --git a/plugin/gentoo-common.vim b/plugin/gentoo-common.vim |
16 |
index 4c4c152..671a3c5 100644 |
17 |
--- a/plugin/gentoo-common.vim |
18 |
+++ b/plugin/gentoo-common.vim |
19 |
@@ -67,17 +67,16 @@ fun! GentooGetPythonTargets() |
20 |
if filereadable(l:pyexec_path) |
21 |
let l:pys = readfile(l:pyexec_path)->filter("v:val =~ '^[^#-]'") |
22 |
\ ->sort() |
23 |
+ let l:impls = [] |
24 |
let l:py3s = [] |
25 |
- let l:others = [] |
26 |
for l:py in l:pys |
27 |
let l:m = l:py->matchstr("^python3.*")->matchstr("\\d*$") |
28 |
if !empty(l:m) |
29 |
eval l:py3s->add(l:m) |
30 |
else |
31 |
- eval l:others->add(l:py) |
32 |
+ eval l:impls->add(l:py) |
33 |
endif |
34 |
endfor |
35 |
- let l:impls = [] |
36 |
if len(l:py3s) ==# 1 |
37 |
let l:impls = l:impls->add("python3_".l:py3s->join()) |
38 |
elseif len(l:py3s) > 1 |
39 |
@@ -104,7 +103,7 @@ fun! GentooGetPythonTargets() |
40 |
\ ->join(",")."}") |
41 |
endif |
42 |
endif |
43 |
- let l:py3 = flatten(l:impls->add(l:others))->join() |
44 |
+ let l:py3 = flatten(l:impls)->join() |
45 |
endif |
46 |
if empty(l:py3) |
47 |
let l:py3 = |