Drop OSC 52 clipboard writes, force-kill on close, bound the reader, find the ST libs for tests
- OSC 52 is ignored: any output, cat'd or remote, could plant a command on the clipboard to paste - kill(): terminate(force=True), so a child ignoring HUP and INT does not outlive its tab with the pty open - reader pauses once 64 unparsed reads wait, so a large dump blocks the child at the pty instead of being buffered whole in memory - tests/_bootstrap.py: add every Lib/python3* directory; Package Control puts the libraries under the active plugin host's own directory
This commit is contained in:
@@ -3,14 +3,16 @@
|
||||
They run as plain scripts (see README), so each imports this first to get the
|
||||
sublime stubs and the Package Control libraries on the path.
|
||||
"""
|
||||
import glob
|
||||
import os
|
||||
import sys
|
||||
|
||||
ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
ST_LIB = os.path.expanduser(
|
||||
"~/Library/Application Support/Sublime Text/Lib/python38")
|
||||
# Package Control puts the libraries under the plugin host's own directory
|
||||
ST_LIBS = sorted(glob.glob(os.path.expanduser(
|
||||
"~/Library/Application Support/Sublime Text/Lib/python3*")))
|
||||
|
||||
for path in (ROOT, ST_LIB, os.path.join(ROOT, "tests", "stubs")):
|
||||
for path in [ROOT] + ST_LIBS + [os.path.join(ROOT, "tests", "stubs")]:
|
||||
if path not in sys.path:
|
||||
sys.path.insert(0, path)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user