diff options
author | 2020-01-16 14:16:09 -0500 | |
---|---|---|
committer | 2020-01-16 14:16:09 -0500 | |
commit | 337f3eaa6f2f2124f1551b0f52547f57313ccc09 (patch) | |
tree | 1ef9e91c92ed9fceee08bccea41d76d33b86d1bc /core | |
parent | 8543925dd9cec8e2e5e39a54b4416b450463f4d1 (diff) | |
download | textadept-337f3eaa6f2f2124f1551b0f52547f57313ccc09.tar.gz textadept-337f3eaa6f2f2124f1551b0f52547f57313ccc09.zip |
Fixed some Windows terminal version issues and updated to PDCurses 3.9.
`io.popen()` and `os.execute()` change the console mode such that mouse clicks
are no longer detected. Make sure it's reset.
Also prevent `os.execute()` output from overwriting the window.
Diffstat (limited to 'core')
-rw-r--r-- | core/init.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/init.lua b/core/init.lua index 9b47de12..5724c908 100644 --- a/core/init.lua +++ b/core/init.lua @@ -21,11 +21,11 @@ if CURSES and WIN32 then function os.spawn(argv, ...) local current_dir = lfs.currentdir() local i = 1 - if type(select(i, ...)) == 'string' then + if type(select(i, ...) or nil) == 'string' then lfs.chdir(select(i, ...)) -- cwd i = i + 1 end - if type(select(i, ...)) == 'table' then i = i + 1 end -- env (ignore) + if type(select(i, ...) or nil) == 'table' then i = i + 1 end -- env (ignore) local p = io.popen(argv..' 2>&1') if select(i, ...) then select(i, ...)(p:read('a')) end -- stdout_cb local status = select(3, p:close()) |