aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/os
Commit message (Collapse)AuthorAge
* vim-patch:8.2.4402: missing parenthesis may cause unexpected problemsBrian Leung2022-04-03
| | | | | | Problem: Missing parenthesis may cause unexpected problems. Solution: Add more parenthesis is macros. https://github.com/vim/vim/commit/ae6f1d8b14c2f63811ee83ef14e32086fb3e9b83
* fix(input): do not translate scroll keys into multiclickszeertzjq2022-04-02
|
* chore: add additional compiler flags (#17815)Lewis Russell2022-03-24
| | | | | | | | | Added: - -Wdouble-promotion - -Wmissing-noreturn - -Wmissing-format-attribute - -Wsuggest-attribute={pure,const,malloc,cold} Resolves: #343
* chore: fix typos (#17670)dundargoc2022-03-17
| | | Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* refactor: fix clint warnings (#17682)dundargoc2022-03-13
|
* refactor(uncrustify): format all c filesDundar Göc2022-03-10
|
* fix(pty_process_win/wait_eof_timer_cb): also check for proc->out.did_eofzeertzjq2022-03-02
|
* refactor(lua): cleanup and docs for threadsbfredl2022-02-26
|
* feat(lua): add proper support of luv threadserw72022-02-26
|
* vim-patch:8.2.0942: expanding to local dir after homedir keeps "~/"zeertzjq2022-02-07
| | | | | | | Problem: Expanding to local dir after homedir keeps "~/". Solution: Adjust modify_fname(). (Christian Brabandt, closes vim/vim#6205, closes vim/vim#5979) https://github.com/vim/vim/commit/0e390f40e944036fb558a63b91238cfda128d95f
* fix(input): never escape CSI byteszeertzjq2022-01-21
|
* Merge pull request #16617 from pekdon/forkptyJames McCoy2021-12-16
|\ | | | | fix: add forkpty for SunOS variants
| * fix: add forkpty for SunOS variantsClaes Nästén2021-12-12
| | | | | | | | | | forkpty is missing on Solaris < 11 and Illumos, provide fallback implementation for non Solaris 11 users.
* | refactor(misc1): move out high-level input functions to a new file: input.cBjörn Linse2021-12-10
| | | | | | | | | | Possibly dialog code is messages.c could be moved here as well. misc1.c is now empty, so delete it.
* | refactor(misc1): move shell related functions to os/shell.cBjörn Linse2021-12-10
| |
* | refactor(misc1): move user related code to os/users.cBjörn Linse2021-12-10
| |
* | Merge pull request #16597 from bfredl/nomisc1Björn Linse2021-12-10
|\ \ | |/ |/| refactor: move out some long-hanging fruit from misc1.c
| * refactor(misc1): move line_breakcheck family of functions to os/input.cBjörn Linse2021-12-09
| |
* | fix: don't use cfsetspeed, use i and o variantsClaes Nästén2021-12-07
| | | | | | | | | | cfsetspeed is not available on SunOS, use cfsetispeed and cfsetospeed instead.
* | fix: don't include pty.h on SunOSClaes Nästén2021-12-07
| |
* | fix: define NAME_MAX from _XOPEN_NAME_MAXClaes Nästén2021-12-06
|/ | | | | On SunOS NAME_MAX is not defined, _XOPEN_NAME_MAX is so fall back to defining NAME_MAX from _XOPEN_NAME_MAX.
* refactor: saner options for uncrustify (#16204)dundargoc2021-11-19
| | | | | | | | | | | | | | | | | | | | | | | | * sp_enum_after_assign = force * sp_brace_typedef = force * nl_do_brace = remove * sp_do_brace_open = force * sp_brace_close_while = force * sp_before_semi = remove * sp_before_semi_for = remove * sp_before_semi_for_empty = remove * sp_between_semi_for_empty = remove * sp_after_semi_for_empty = remove * sp_before_square = remove * sp_before_squares = remove * sp_inside_square = remove * sp_inside_fparens = remove * sp_inside_fparen = remove * sp_inside_tparen = remove * sp_after_tparen_close = remove * sp_return_paren = force * pos_bool = lead * sp_pp_concat = remove * sp_pp_stringify = remove * fixup: disable formatting for the INIT section
* refactor: reduce number of explicit char casts (#16077)dundargoc2021-11-16
| | | * refactor: reduce number of explicit char casts
* vim-patch:8.1.0779: argument for message functions is inconsistentJames McCoy2021-11-01
| | | | | | Problem: Argument for message functions is inconsistent. Solution: Make first argument to msg() "char *". https://github.com/vim/vim/commit/32526b3c1846025f0e655f41efd4e5428da16b6c
* vim-patch:8.1.0743: giving error messages is not flexibleJames McCoy2021-11-01
| | | | | | | | | Problem: Giving error messages is not flexible. Solution: Add semsg(). Change argument from "char_u *" to "char *", also for msg() and get rid of most MSG macros. (Ozaki Kiichi, closes vim/vim#3302) Also make emsg() accept a "char *" argument. Get rid of an enormous number of type casts. https://github.com/vim/vim/commit/f9e3e09fdc93be9f0d47afbc6c7df1188c2a5a0d
* refactor: saner options for uncrustify #16196dundargoc2021-10-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * refactor: general good option changes sp_deref = remove sp_not = remove sp_inv = remove sp_inside_paren_cast = remove mod_remove_duplicate_include = true sp_after_semi = add sp_after_semi_for = force sp_sizeof_paren = remove nl_return_expr = remove nl_else_brace = remove nl_else_if = remove * refactor: mod_remove_extra_semicolon = true * refactor: nl_max = 3 * refactor: sp_bool = force * refactor: sp_compare = force * refactor: sp_inside_paren = remove * refactor: sp_paren_paren = remove * refactor: sp_inside_sparen = remove * refactor: sp_before_sparen = force * refactor: sp_sign = remove * refactor: sp_addr = remove * refactor: sp_member = remove * refactor: nl_struct_brace = remove * refactor: nl_before_if_closing_paren = remove * refactor: nl_fdef_brace = force * refactor: sp_paren_comma = force * refactor: mod_full_brace_do = add
* refactor: uncrustify #16090dundargoc2021-10-29
|
* refactor: format header files with uncrustify #15877dundargoc2021-10-09
| | | | | | * refactor: format header files with uncrustify * fixup(justin): skip formatting of terminfo_defs.h * fixup: force winsock2 to be included first * fixup: simplify disable/enable directive to "uncrustify:off/on"
* fix(tui): remove dead code #15929erw72021-10-06
| | | | | Before #15889, we used our fork of libuv which supports Windows 7/8. After #15889, we use upstream libuv, which does not support Windows 7 and lacks mouse/altbuf support for Windows 8 console.
* refactor: remove redundant char casts #15888dundargoc2021-10-04
|
* Refactor/uncrustify (#15790)dundargoc2021-09-29
| | | | | | | | | | | | | * refactor: format with uncrustify * fixup(dundar): fix functions comments * fixup(dundar): remove space between variable and ++/-- * fixup(dundar): better workaround for macro attributes This is done to be able to better use uncrustify rules for macros * fixup(justin): make preprocessors follow neovim style guide
* fix(tui): remove obsolete $NVIM detection #15791erw72021-09-26
| | | | | | | | | | Initially, we planned to set the NVIM environment variable to detect that neovim is running in the neovim built-in terminal. At the time this code was written, there was no way for a parent to set environment variables for a program running in an embedded terminal. Later it was implemented in #12937, but the code to set the NVIM was not added. #11390 now uses ConPTY instead of winpty when possible, so it is no longer necessary to force the use of win32con even when running inside an embedded terminal. Therefore, we now do not need this code.
* refactor: format with uncrustify #15778dundargoc2021-09-25
| | | * fixup: force exactly one whitespace between type and variable
* 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>