aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/os
Commit message (Collapse)AuthorAge
* refactor: reformat with uncrustify #15736dundargoc2021-09-20
| | | | * fix function parameter comments * remove space after star in function names
* refactor: format files with uncrustify #15663dundargoc2021-09-14
|
* refactor(map): remove extra-allocating map_new/map_free functionsBjörn Linse2021-08-22
| | | | | | | | | | Note: the reason for removing them is not that there after this refactor is no use of them, but rather that having them available is an anti-pattern: they manange an _extra_ heap allocation which has nothing to do with the functionality of the map itself (khash manages the real buffers internally). In case there happens to be a reason to allocate the map structure itself later, this should be made explicit using xcalloc/xfree calls.
* chore: use codespell to spell check #15016dundargoc2021-07-07
|
* coverity/331377: os_fopen: Remove invalid iflags assertJames McCoy2021-05-06
| | | | | | If the O_* flags were non-zero, then ORing the flags would always be true. However, the O_* flags aren't guaranteed to be non-zero, so the assert is invalid in the first place.
* coverity/331399: Remove unused "term_name" member from PtyProcessJames McCoy2021-05-06
|
* vim-patch:8.1.2313: debugging where a delay comes from is not easyJan Edmund Lazo2021-04-15
| | | | | | Problem: Debugging where a delay comes from is not easy. Solution: Use different values when calling ui_delay(). https://github.com/vim/vim/commit/eda1da0c9a8db1400649629117e7d248c07735f7
* Add more info to debug messagesJames McCoy2021-04-08
| | | | [skip ci]
* os/win: fix build failureJan Edmund Lazo2021-03-31
|
* Change QUEUE_FOREACH macro to use while instead of forerw72021-03-30
|
* vim-patch:8.1.0989: various small code uglinessJan Edmund Lazo2021-03-29
| | | | | | | Problem: Various small code ugliness. Solution: Remove pointless NULL checks. Fix function calls. Fix typos. (Dominique Pelle, closes vim/vim#4060) https://github.com/vim/vim/commit/bdace838c67c1bd94e55e34270a8325933891466
* vim-patch:8.1.2326: cannot parse a date/time stringJan Edmund Lazo2021-03-27
| | | | | | | | | | | | | | | Problem: Cannot parse a date/time string. Solution: Add strptime(). (Stephen Wall, closes #) https://github.com/vim/vim/commit/10455d43fef041309ce0613fa792c635dd71e3a8 N/A patches for version.c: vim-patch:8.1.2344: Cygwin: warning for using strptime() Problem: Cygwin: warning for using strptime(). Solution: Move defining _XOPEN_SOURCE and __USE_XOPEN to vim.h. (Ken Takata, closes vim/vim#5265) Use 700 for _XOPEN_SOURCE for mkdtemp(). https://github.com/vim/vim/commit/6a228c6463935a73c8f21142cb7368545cfee317
* state: throttle batched event processing when input is availableBjörn Linse2021-03-08
| | | | | | | before, calling vim.schedule() from inside an event would execute the scheduled callback immediately after this event without checking for user input in between. Break event processing whenever user input or an interrupt is available.
* fix(pty): Always use $TERM from the job's env dictJames McCoy2021-02-06
| | | | | | | | | | | | | | | | | | | | | | Before #12937, the only way to specify the `$TERM` for a pty job was through the `TERM` key in the job's opts dict. This was shuttled to the child process throug a special field on the PtyProcess object and injected into the environment after forking. Now that we have a proper way to specify the environment for a job, we can simply ensure that the env dict has a proper `TERM` set and avoid the extra shuttling of data around. This deprecates the use of the `TERM` option, but will still honor it if present, although at a lower priority than a `TERM` present in the env dict. This also fixes #13874 because we're no longer trying to overwrite `TERM` in the env dict with the special pty `term_name`. Doing so raises an internal error because of the existing key which, under certain circumstances, would cause the "hit enter" prompt. However, since the child process had already forked, there was no way for the user to acknowledge the prompt and we would just hang there.
* Use abort() instead of assert(false) for things that should never happenJames McCoy2021-01-31
| | | | | | | | assert() is compiled out for release builds, but we don't want to continue running in these impossible situations. This also resolves the "implicit fallthrough" warnings for the asserts in switch cases.
* fix(pty_proc/macOS): Properly set the environment for the childJames McCoy2021-01-31
| | | | | | Binding _NSGetEnviron()'s return value to a local variable and then re-binding that is incorrect. We need to directly update what _NSGetEnviron() refers to.
* Pass environment on to pty processes on WindowsJames McCoy2021-01-31
| | | | | | | | | | | | vim-patch:8.2.0239: MS-Windows: 'env' job option does not override existing vars Problem: MS-Windows: 'env' job option does not override existing environment variables. (Tim Pope) Solution: Set the environment variables later. (Yasuhiro Matsumoto, closes vim/vim#5485, closes vim/vim#5608) https://github.com/vim/vim/commit/355757aed6ae2ae5446882570d89f243e4805937 Co-authored-by: erw7 <erw7.github@gmail.com>
* Common handling of required/ignored env varsJames McCoy2021-01-31
| | | | | | | | | | When starting a pty job, there are certain env vars that we need to either add or remove. Currently, there are two relevant scenarios. * Removing irrelevant env vars on Unix, mostly related to the terminal hosting nvim since they do not apply to a libvterm-hosted terminal. * Adding required env vars for Windows jobs.
* Use dict_T to pass env vars to process spawning codeJames McCoy2021-01-31
| | | | Co-authored-by: Matthieu Coudron <mattator@gmail.com>
* logging: move to XDG_CACHE_HOME (#13739)Michael Lingelbach2021-01-13
| | | | | while there is some controversy, stdpath('cache') looks like a better fit for logs than stdpath('data'): you can remove logs without preventing nvim to work which fits the XDG_CACHE_HOME definition of `user specific non-essential data files`.
* Use uv_os_homedir and current directory as backup when $HOME is not set (#13657)ffanzhang2021-01-10
| | | | | | Close https://github.com/neovim/neovim/issues/8614 Use uv_os_homedir and current directory as backup if HOME env is not set. Allocate homedir only if var is not NULL.
* input: consider "-- more --" state to be blocking, fixes #11899Björn Linse2021-01-04
|
* fix: Include auto/config.h before HAVE_* preprocessor checksJames McCoy2020-12-15
| | | | Closes #13533
* Fix colors in terminal by maintaining COLORTERMThomas Fehér2020-11-26
| | | | Fixes https://github.com/neovim/neovim/issues/10836
* Removed restricted mode - Fix #11972georg3tom2020-11-11
|
* vim-patch:8.1.0268: file type checking has too many #ifdef (#13182)tamago3242020-11-06
| | | | | Problem: File type checking has too many #ifdef. Solution: Always define the S_IF macros. (Ken Takata, closes vim/vim#3306) https://github.com/vim/vim/commit/d569bb029983cff947dce704e6f830276204c13f
* startup: handle autoload and lua packages during startupBjörn Linse2020-11-02
| | | | ¡NO HAY BANDA!
* vim-patch:8.2.0728: messages about a deadly signal are not left alignedJan Edmund Lazo2020-10-16
| | | | | | Problem: Messages about a deadly signal are not left aligned. Solution: Output a CR before the NL. (Dominique Pelle, vim/vim#6055) https://github.com/vim/vim/commit/69212b11d18d9d8951968f6ca88e6ce046c90675
* vim-patch:8.2.1757: Mac: default locale is lacking the encoding (#12994)Jan Edmund Lazo2020-09-28
| | | | | | | | | vim-patch:8.2.1757: Mac: default locale is lacking the encoding Problem: Mac: default locale is lacking the encoding. Solution: Add ".UTF-8 to the locale. (Yee Cheng Chin, closes vim/vim#7022) https://github.com/vim/vim/commit/a5fe91e6dc610bc823bc3201e2c88179989b13fb Cherry-pick test_environ.vim changes from patch 8.2.1432.
* win: avoid duplicate separators in $PATH #12869Justin M. Keyes2020-09-08
| | | | | | | | | | | | | | | Seems like redundant env var separators (";" on Windows) in $PATH can cause weird behavior. From #7377: > After some time, system(['win32yank', '-o']) and system('win32yank -o') > start returning different results: specifically first returns an > empty string. > > 1. $PATH weirdly contains double semicolon followed by path to the > “installation directory” (unpacked directory from archive). > 2. If I run `let $PATH=substitute($PATH, ';;', ';', 'g')` the problem is fixed. close #7377 ref 224f99b85d311ebd31451db13b66e4a3c7e51938
* Merge pull request #12804 from janlazo/vim-8.1.1725Jan Edmund Lazo2020-08-31
|\ | | | | [RDY]vim-patch:8.1.{1694,1725,1776,1804,1806,1831,2041,2198,2206},8.2.{1033,1315,1548}
| * vim-patch:8.1.1725: MS-Windows: E325 message may use incorrect date formatJan Edmund Lazo2020-08-30
| | | | | | | | | | | | | | Problem: MS-Windows: E325 message may use incorrect date format. Solution: Convert strftime() result to 'encoding'. Also make the message translatable. (Ken Takata, closes vim/vim#4685, closes vim/vim#4681) https://github.com/vim/vim/commit/663bbc09babea1ff8dfa7ccd58801ac9219fc2b2
* | docs, remove 'guifontset' #11708Justin M. Keyes2020-08-31
|/ | | | | | | | | | | | | - remove redundant autocmd list This "grouped" list is useless, it only gets in the way when searching for event names. - intro.txt: cleanup - starting.txt: update, revisit - doc: `:help bisect` - mbyte.txt: update aliases 1656367b90bd. closes #11960 - options: remove 'guifontset'. Why: - It is complicated and is used by almost no one. - It is unlikely to be implemented by Nvim GUIs (complicated to parse, specific to Xorg...).
* Merge remote-tracking branch 'upstream/master' into libcallnrJames McCoy2020-08-08
|\
| * Merge remote-tracking branch 'upstream/master' into fileinfo-garbageJames McCoy2020-07-31
| |\
| | * Merge pull request #12376 from erw7/fix-stack-overflow-on-input-enqueueMatthieu Coudron2020-06-08
| | |\ | | | | | | | | input: fix stack overflow
| | | * [squash] fix comment [skip ci]erw72020-05-26
| | | |
| | | * input: fix stack overflowerw72020-05-25
| | | | | | | | | | | | | | | | fixes #12287, #11788
| | * | vim-patch:8.0.1564: too many #ifdefsJan Edmund Lazo2020-06-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Too many #ifdefs. Solution: Graduate the +autocmd feature. Takes away 450 #ifdefs and increases code size of tiny Vim by only 40 Kbyte. https://github.com/vim/vim/commit/f2bd8ef2b4507d02c6043affff8f7e85e3414d5f
| | * | win/TUI: enable mouse on ConEmu and vtpcon without vtierw72020-05-26
| | |/
| | * TUI: block signals on suspend #12180Kei Kamikawa2020-04-25
| | | | | | | | | fix #8075
| | * Merge pull request #12047 from erw7/fix-resolve-on-windowsMatthieu Coudron2020-04-19
| | |\ | | | | | | | | | | | | Change resolve() to resolve symbolic links on Windows Neovim worked the same way as vim for shortcuts, but didn't handle symbolic links and junction cases. This PR implements the same behavior for symbolic links and junctions as for vim.
| | | * Change to canonicalize only when reparse point in includederw72020-04-02
| | | |
| | | * Change resolve() to resolve symbolic links on Windowserw72020-04-02
| | | |
| | * | vim-patch:8.1.1567: localtime_r() does not respond to $TZ changesJan Edmund Lazo2020-03-29
| | | | | | | | | | | | | | | | | | | | | | | | Problem: Localtime_r() does not respond to $TZ changes. Solution: If $TZ changes then call tzset(). (Tom Ryder) https://github.com/vim/vim/commit/db51730df1817fc4b6ecf5a065c69fac518ad821
| | * | vim-patch:8.1.1313: warnings for using localtime() and ctime()Jan Edmund Lazo2020-03-29
| | |/ | | | | | | | | | | | | | | | Problem: Warnings for using localtime() and ctime(). Solution: Use localtime_r() if available. Avoid using ctime(). https://github.com/vim/vim/commit/63d2555c9cefbbeeca3ec87fdd5d241e9488f9dd
| | * pvs/v1048: variable was assigned same valueJan Edmund Lazo2020-03-01
| | |
| | * env: try find library dir (like /usr[/local]/lib/nvim) and add it to &rtpBjörn Linse2020-02-07
| | |
| | * lintJustin M. Keyes2020-02-02
| | |
| | * refactor: move various things to os/shell.cJustin M. Keyes2020-02-02
| | | | | | | | | | | | | | | - No code changes - Rename mch_expand_wildcards => os_expand_wildcards