aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/os
Commit message (Collapse)AuthorAge
...
* | test/win: executable(), exepath() #9516erw72019-04-01
| |
* | win: exepath(): append extension if omittederw72019-04-01
| | | | | | | | fixes #9403
* | win: executable(): also check extensionerw72019-04-01
| |
* | win: executable(): fix relative path bugerw72019-04-01
| | | | | | | | | | Qualified (i.e. dot-prefixed) relative paths should only search CWD, not $PATH.
* | Merge #9686 'win/Lua: monkey-patch os.getenv()'Justin M. Keyes2019-03-16
|\ \ | |/ |/| | | fixes #9681
| * Fix os.getenv of lua on Windowserw72019-03-07
| | | | | | | | | | Change to use os_getenv instead of getenv because environment variable set by uv_os_setenv can not be get with getenv.
| * Fix environment variable on Windowserw72019-03-06
| | | | | | | | | | | | | | Since uv_os_setenv uses SetEnvironmentVariableW, _wenviron is no updated. As a result, inconsistency occurs in completion of environment variable names. Change to use GetEnvironmentStaringsW instead of _wenviron to solve it.
* | executable(): return false if user is not owner #9703erw72019-03-09
|/ | | | | | | | | | S_IXUSR does not check ownership. Test case: touch test.txt chmod 744 test.txt sudo chown root:root test.txt nvim -u NORC :echo executable('./test.txt')
* os/env: Fix completion of multibyte env var nameserw72019-03-03
| | | | fixes #9655
* floats: implement floating windowsBjörn Linse2019-03-02
| | | | Co-Author: Dongdong Zhou <dzhou121@gmail.com>
* os: remove uv_translate_sys_error impl #9652Justin M. Keyes2019-03-01
| | | Since libuv minimum version is now v1.12, we can use libuv's impl.
* clint: check env functionsJustin M. Keyes2019-02-28
|
* os/env: use libuv v1.12 getenv/setenv APIJustin M. Keyes2019-02-27
| | | | | | | | | | | - Minimum required libuv is now v1.12 - Because `uv_os_getenv` requires allocating, we must manage a map (`envmap` in `env.c`) to maintain the old behavior of `os_getenv` . - free() map-items after removal. khash.h does not make copies of anything, so even its keys must be memory-managed by the caller. closes #8398 closes #9267
* os_getenv, os_setenv: revert "widechar" implJustin M. Keyes2019-02-26
| | | | | | | | | | It's reported that the Windows widechar variants do automatically convert from the current codepage to UTF16, which is very helpful. So the "widechar" impls are a good direction. But libuv v1.12 does that for us, so the next commit will use that instead. ref #8398 ref #9267
* win: os_getenv(): use _wgetenv()Justin M. Keyes2019-02-25
|
* os_setenv: use _wputenv_s; remove vestigial code #7920Justin M. Keyes2019-02-25
| | | | | _putenv_s variant was left over from 810d31a43001, should have been removed in cd5b1315757e.
* I/O: ignore ENOTSUP for failed fsync()Justin M. Keyes2019-02-21
| | | | | | | | | Suggested by ZyX in https://github.com/neovim/neovim/issues/6725#issuecomment-312197691 : > There already is an exception if writing to a “device” (e.g. FIFO). > It makes sense to ignore certain errors like ENOTSUP or EOPNOTSUPP > since it is not something we or user can do anything about. ref #6725
* deps: update to libuv v1.26.0Justin M. Keyes2019-02-21
| | | | | | | | | | | | | | | | | | | | | | | Notable changes since v1.23.2: - v1.26.0 - uv_os_uname() - unix: don't attempt to invalidate invalid fd https://github.com/libuv/libuv/commit/1ce6393a5780538ad8601cae00c5bd079b9415a9 - v1.25.0 - unix: better handling of unsupported F_FULLFSYNC (fixes #6725) https://github.com/libuv/libuv/commit/6fc797c3fe18d8df71b36ecf2184f085c0283251 - tty,win: fix Alt+key under WSL https://github.com/libuv/libuv/commit/d2e59bb6003d707bdebd7a381f5a7e1d0cc3fd3b - fsevents: really watch files with fsevents on macos 10.7+ https://github.com/libuv/libuv/commit/2d2af382ce84b91d6ee7a185af32fca7f0acd84b - win: fix duplicate tty vt100 fn key - v1.24.0 - win,fs: retry if uv_fs_rename fails https://github.com/libuv/libuv/commit/e94c184c7c4a18f3de569c97caeb83f4ff98a4b2 - later [reverted](https://github.com/libuv/libuv/issues/2098) but may be useful reference - win: support more fine-grained windows hiding https://github.com/libuv/libuv/commit/4c2dcca27b80945d6b7063f0ea031b8a75a46a52
* fix "E667: Fsync failed" on macOSJustin M. Keyes2019-02-21
| | | | | | | | | | | | | macOS: Try direct fsync() if F_FULLFSYNC fails. closes #6725 ref https://github.com/vim/vim/pull/4016 vim-patch:8.1.0957 > on macOS F_FULLFSYNC fails with ENOTSUP for unsupported storage systems > (e.g. SMB), though this is not documented in the Apple fcntl man page. libuv fixed this in v1.25.0: https://github.com/libuv/libuv/commit/6fc797c3fe18d8df71b36ecf2184f085c0283251
* Merge #9560 from justinmk/Wmissing-prototypesJustin M. Keyes2019-02-04
|\
| * build: -Wmissing-prototypesJustin M. Keyes2019-02-04
| | | | | | | | | | | | | | ref #343 Though I don't see a strong benefit, it isn't too much of a burden, and maybe avoids confusion in some cases.
* | events: add "Signal" event #9564Marco Hinz2019-02-04
|/ | | | | ..which gets triggered when SIGUSR1 is sent to the nvim process. Closes #9562
* ui: multigrid mouse supportBjörn Linse2019-01-20
|
* Merge #9401 from justinmk/pr-win-erw7Justin M. Keyes2018-12-30
|\
| * cleanup: Remove os_term_is_nice()Justin M. Keyes2018-12-30
| |
| * refactor: Extract os_tty_guess_term()Justin M. Keyes2018-12-30
| | | | | | | | | | - Also remove feature-detection of uv_set_vterm_state(): instead, on Windows we always require libuv to have that function.
* | vim-patch:8.1.0662: needlessly searching for tilde in stringJames McCoy2018-12-30
|/ | | | | | Problem: Needlessly searching for tilde in string. Solution: Only check the first character. (James McCoy, closes vim/vim#3734) https://github.com/vim/vim/commit/ef0a1d5ed3566b91143d30ae9de3240f47c6e282
* TUI: detect BSD vt consoleJustin M. Keyes2018-12-16
| | | | | | | | | | | | | | FreeBSD console sets TERM=xterm, but it does not support xterm features like cursor-shaping. GUI terminals typically set TERM=xterm-256color, so on FreeBSD we can guess that TERM=xterm is the degraded vt. OpenBSD console sets TERM=vt220 https://github.com/openbsd/src/blob/master/etc/etc.amd64/ttys NetBSD console sets TERM=vt100 https://github.com/NetBSD/src/blob/trunk/etc/etc.amd64/ttys closes #8644
* os/lang: use the correct LC_NUMERIC also for OS XBjörn Linse2018-12-13
|
* macOS: infer primary language if $LANG is empty #9345Marco Hinz2018-12-11
| | | | | | | | | | | | | | The macOS preferences have a section called `Language & Region`. There is always at least one language defined, the primary language. CFLocaleCopyPreferredLanguages() returns the languages defined in that section, the first element being the primary language. Use the primary language in case CFLocaleCopyCurrent() returns NULL. In the case that the above fallback does not work either, which is very unlikely, log the error and continue with an empty $LANG. References #9134
* jobstart(): Fix hang on non-executable cwd #9204Tommy Allen2018-11-07
| | | | | | | * os/fs.c: add os_isdir_executable() * eval.c: fix hang on job start caused by non-executable cwd option * channel.c: assert cwd is an executable directory * test: jobstart() produces error when using non-executable cwd
* shell/logging: Fix E730 with verbose system({List}) #9009Justin M. Keyes2018-09-21
| | | | | | | | ref https://github.com/neovim/neovim/issues/9001#issuecomment-421843790 Steps to reproduce: :set verbose=9 :call system(['echo']) E730: using List as a String
* log: RPC, input, other eventsJustin M. Keyes2018-09-19
|
* do_shell, do_filter: Remove "clear screen", "wait for return" callsJustin M. Keyes2018-09-12
| | | | | The output from shell commands is already handled by the messages.c/UI layer.
* Refactor: remove mb_ptr2len_len, mb_ptr2cells and mb_ptr2cells_lenZviRackover2018-08-31
| | | | Remove occurences of these macros.
* shell.c: fix scan-build NPE warning #8932Justin M. Keyes2018-08-29
|
* vim-patch:8.0.0883: invalid memory access with nonsensical scriptJan Edmund Lazo2018-08-24
| | | | | | Problem: Invalid memory access with nonsensical script. Solution: Check "dstlen" being positive. (Dominique Pelle) https://github.com/vim/vim/commit/1c864093f93b0066de25d6c0ddf03a6bc6b1c870
* Fix crash in lang_init() on macOS if lang_region = NULLbattlmonstr2018-08-01
| | | | | | | | | | This is a regression after PR #7704: mac: Set $LANG based on the system locale CFStringGetCStringPtr sometimes returns "lang_region" = NULL, in this case CFStringGetCString is used instead, which places output to "buf", but "buf" was not used by the code.
* Merge pull request #8485 from janlazo/vim-8.0.1012James McCoy2018-07-27
|\ | | | | [RDY] vim-patch:8.0.{805,806,810,1012,1017}
| * vim-patch:8.0.1012: MS-Windows: problem with $HOME when is was set internallyJan Edmund Lazo2018-07-24
| | | | | | | | | | | | | | | | | | Problem: MS-Windows: Problem with $HOME when is was set internally. Solution: Only use the $HOME default internally. (Yasuhiro Matsumoto, closes vim/vim#2013) https://github.com/vim/vim/commit/48340b62e812dc9280f621a2eb6db76d43555c66 Restore vim_getenv() behaviour for $HOME on Windows.
* | rename: os_get_localtime => os_localtimeJustin M. Keyes2018-07-24
|/
* Check all child processes for exit in SIGCHLD handlerDavid Hotham2018-07-14
| | | | | | | | If a second and third child exit while we are already in the handler, we will only see a single additional SIGCHLD. Therefore the handler must not stop after processing a single child but should check all children. Fixes #8740
* Only waitpid() for processes that we care aboutDavid Hotham2018-07-13
| | | | | | | | | | | | | | | | | | | | | | It seems as though in an AppImage there's an extra child process that dies at some early point, before we have set up a SIGCHLD handler. So when we later get a SIGCHLD from a child that we do care about, waitpid(-1, ...) tells us about the extra child - and we don't notice that the interesting child has exited. Or something like that! See also: * https://patchwork.kernel.org/patch/9949491/ in which perf hit something similar * discussion at the AppImage repository: https://github.com/AppImage/AppImageKit/issues/812#issuecomment-404662110. Fix is to be explicit about which process we are waitpid()'ing for, so we never need be distracted by children that we don't know about. Fixes #8104
* use wchar_t instead of WCHAR #6998Matt Kline2018-06-18
| | | | wchar_t has better cross-platform support and seems to fix an issue on MinGW when building with `-std=c99`.
* doc: job/channel, misc #7783Justin M. Keyes2018-06-11
| | | | | | | | | | | doc: termios defaults. ref #6992 doc: :help shell-powershell doc: provider: Python minimum version is 2.7, 3.4 doc: remove :!start special-case. #5844 doc: mention #7917 change which accepts empty Array for Dictionary parameter doc: <Cmd> pseudokey doc: lmap change #5658 doc: -s, -es
* Merge #7679 'startup: treat stdin as text instead of commands'Justin M. Keyes2018-06-10
|\
| * cleanup, test interactive -EJustin M. Keyes2018-06-04
| |
| * win/startup: remove --literalJustin M. Keyes2018-06-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes 2 failing tests in startup_spec.lua. The Windows-only `--literal` option complicates support of "stdin-as-text + file-args" (#7679). Could work around it, but it's not worth the trouble: - users have a reasonable (and englightening) alternative: nvim +"n *" - "always literal" is more consistent/predictable - avoids platform-specific special-case Unrelated changes: - Replace fileno(stdxx) with STDXX_FILENO for consistency (not motivated by any observed technical reason).
| * startup: allow explicit "-" file arg with --headlessJustin M. Keyes2018-06-04
| |
| * startup: fix -es/-Es so they are actually silentJustin M. Keyes2018-06-04
| | | | | | | | | | | | silent-mode (-es/-Es) has been broken for years. The workaround up to now was to include --headless. But --headless is not equivalent because it prints all messages, not the limited subset defined by silent-mode.