Commit 0dbb762
committed
Prevent SIGSEGV using both python and python3
$ vim --cmd 'py3 print("test")' --cmd 'py print("test")'
$ vim --cmd 'py print("test")' --cmd 'py3 print("test")'
It causes SIGSEGV. Technically, it would work with special Python2 built
and Python3 built. However Python2 in OS X System and Python3 in
Homebrew don't have the capability at all. This patch prevents SIGSEGV
and make Vim can track the situation properly.
$ vim --cmd 'py print("test")' --cmd 'py3 print("test")'
E837: This Vim cannot execute :py3 after using :python
E263: Sorry, this command is disabled, the Python library could not be loaded.1 parent b8d8fb1 commit 0dbb762
2 files changed
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6447 | 6447 | | |
6448 | 6448 | | |
6449 | 6449 | | |
| 6450 | + | |
6450 | 6451 | | |
6451 | 6452 | | |
6452 | 6453 | | |
| |||
6568 | 6569 | | |
6569 | 6570 | | |
6570 | 6571 | | |
| 6572 | + | |
6571 | 6573 | | |
6572 | 6574 | | |
6573 | 6575 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1520 | 1520 | | |
1521 | 1521 | | |
1522 | 1522 | | |
| 1523 | + | |
1523 | 1524 | | |
1524 | 1525 | | |
1525 | 1526 | | |
| |||
1601 | 1602 | | |
1602 | 1603 | | |
1603 | 1604 | | |
| 1605 | + | |
1604 | 1606 | | |
1605 | 1607 | | |
1606 | 1608 | | |
| |||
0 commit comments