aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/os
Commit message (Collapse)AuthorAge
...
* | eval: allow setting cwd in {jobstart,termopen}()Aleksa Sarai2016-06-07
| | | | | | | | | | | | | | | | | | | | | | Processes in vim are always started in the current directory, which causes issues when the process is a daemon and the current directory is a mountpoint. Fix this by adding an option to set the cwd of the new process with jobstart(). In addition, fix termopen() so that it actually uses the cwd option from the dict (it couldn't previously set the cwd value due to dead code). Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
* | pty_process: split into plat-specific files (#3976)Rui Abreu Ferreira2016-06-04
| |
* | *: Rename main loop variable from loop to main_loopZyX2016-05-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current name is inappropriate for the following reasons: 1. It is often masked by local `loop` variables. 2. It cannot be searched for. There are many `loop` variables where `loop` is some local variable. There are many cases when “loop” word is used in a comment. 3. It is in any case bad idea to use a generic name as a name of the global variable. Best if global has module prefix: this is why it is in `main.h`: `main_loop` both stands for “a main loop” and “a loop defined in `main.*`”. Since I have no idea how to list every occurrence of this variable method used to rename it is “remove it from globals.h, try to compile, fix errors”. Thus if some occurrence was hidden under false `#if` branch it was not replaced.
* | os_nodetype: Return NODE_NORMAL if os_stat fails.Justin M. Keyes2016-05-22
| | | | | | | | | | | | | | | | Conforms to Vim's mch_nodetype. Regression by 7db4a15. buf_write() expects NODE_WRITABLE for character devices such as /dev/stderr. Closes #4772
* | os/env.c: document remove_tail() properlyFelipe Oliveira Carvalho2016-05-15
| |
* | os/env.c: declare srcp and dst as restrict in expand_env_esc()Felipe Oliveira Carvalho2016-05-15
| | | | | | | | | | | | | | | | | | | | | | ...and small refactorings: - Style changes - Variable renames - Changes in variable scope This change won't bring new problems (undefined behavior) as `memcpy` is already being used in the function.
* | os/env.c: cosmetic changes done during review of the fileFelipe Oliveira Carvalho2016-05-15
|/
* vim-patch:7.4.896Rui Abreu Ferreira2016-05-08
| | | | | | | | | Problem: Editing a URL, which netrw should handle, doesn't work. Solution: Avoid changing slashes to backslashes. (Yasuhiro Matsumoto) https://github.com/vim/vim/commit/b4f6a46b01ed00b642a2271e9d1559e51ab0f2c4 Cherry-picked from https://github.com/neovim/neovim/pull/810, rebased.
* Windows: Fix os_nodetype() default returnRui Abreu Ferreira2016-05-06
|
* Merge pull request #4678 from KillTheMule/vim-7.4.672Justin M. Keyes2016-05-04
|\ | | | | vim-patch:7.4.672
| * vim-patch:7.4.672KillTheMule2016-05-02
| | | | | | | | | | | | | | | | | | | | | | Problem: When completing a shell command, directories in the current directory are not listed. Solution: When "." is not in $PATH also look in the current directory for directories. https://github.com/vim/vim/commit/b5971141dff0c69355fd64196fcc0d0d071d4c82 Most of it applied manually.
* | Merge pull request #4680 from equalsraf/tb-windows-winsock2Justin M. Keyes2016-05-02
|\ \ | |/ |/| Windows: Include winsock2.h before windows.h
| * Windows: Include winsock2.h before windows.hRui Abreu Ferreira2016-04-30
| | | | | | | | | | | | | | winsock2.h is incompatible with winsock.h (included by windows.h) and must be included first. For reference see https://msdn.microsoft.com/en-us/library/windows/desktop/ms737629%28v=vs.85%29.aspx
* | *: Fix new linter errorsZyX2016-05-01
|/ | | | Originally there were 128 new errors, so I thought this is a good idea to fix all of them. Of course, this commit also fixes many suppressed errors.
* Merge pull request #4675 from barraponto/patch-1Justin M. Keyes2016-04-29
|\ | | | | Increase readability of unit conversion.
| * Increase readability of unit conversion.Capi Etheriel2016-04-29
| |
* | Add missing include fcntl.hRui Abreu Ferreira2016-04-29
|/ | | | In Windows, open() flags like O_RDONLY need fcntl.h.
* os_nodetype: impl with libuvJustin M. Keyes2016-04-29
|
* Merge pull request #4593 from ZyX-I/length-functionsJustin M. Keyes2016-04-26
|\ | | | | Make some function accept strings with length in place of just strings
| * keymap: Make replace_termcodes and friends accept length and cpo_flagsZyX2016-04-18
| | | | | | | | | | | | | | Reasons: - One does not have to do `s[len] = NUL` to work with these functions if they do not need to replace the whole string: thus `s` may be const. - One does not have to save/restore p_cpo to work with them.
* | vim-patch:7.4.1114Jurica Bradaric2016-04-20
|/ | | | | | | Problem: delete() does not work well with symbolic links. Solution: Recognize symbolik links. https://github.com/vim/vim/commit/43a34f9f74fdce462fa250baab620264c28b6165
* path.c: enable -WconversionCharles Joachim2016-03-27
|
* Lint: fix line length >80Marco Hinz2016-03-04
| | | | | | Introduced here: https://github.com/neovim/neovim/commit/4bfac00aa389487c4f11d34e7a3e96e4a1116800#diff-2bf87eef9f7b99dcea4b0c55beee2d63R78
* Windows: XDG: Update default paths. #4403Rui Abreu Ferreira2016-03-03
| | | | | | | | | | | | | | | The previous defaults were including the nvim suffix, causing it to apear twice in the final paths. kXDGDataHome and kXDGConfigHome are now set as %LOCALAPPDATA%, kXDGCacheHome is set as $TEMP. In Windows there is no distinction between configuration and data storage, but we don't want to place all files under the same path. get_xdg_home() now appends a different path suffix for kXDGDataHome. - Configuration files are saved under %LOCALAPPDATA%\nvim - Data files are saved under %LOCALAPPDATA%\nvim-data
* Merge pull request #4277 from Jun-T/lang2localeJustin M. Keyes2016-02-26
|\ | | | | build: install *.mo into the "standard" directory
| * build: install *.mo into the "standard" directoryJun T2016-02-23
| | | | | | | | | | | | | | Change POROJECT_NAME to 'nvim', and use it as the gettext domain name. The *.mo files, previously installed as $runtime/lang/xx/LC_MESSAGES/nvim.mo, are now installed as $prefix/locale/xx/LC_MESSAGES/nvim.mo.
* | vim-patch:7.4.936 #4271watiko2016-02-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Crash when dragging with the mouse. Solution: Add safety check for NULL pointer. Check mouse position for valid value. (Hirohito Higashi) https://github.com/vim/vim/commit/294a7e55b01149154807a23323038784549b8946 --- see: "Crash while mouse-selecting in two-buffer mode" https://github.com/vim/vim/issues/486 Fix #3704
* | vim-patch:7.4.845watiko2016-02-21
| | | | | | | | | | | | | | Problem: Compiler warning for possible loss of data. Solution: Add a type cast. (Erich Ritz) https://github.com/vim/vim/commit/5df1ed2de3fa9dcace996b9a0a4c9b3cea79cf1e
* | vim-patch:7.4.832watiko2016-02-21
|/ | | | | | | | | | | | | | | Problem: $HOME in `=$HOME . '/.vimrc'` is expanded too early. Solution: Skip over `=expr` when expanding environment names. https://github.com/vim/vim/commit/be83b73ddb2ee8297037166d243f72e3423a3ce3 --- To reproduce: ```sh nvim -u NONE -c 'e `=$HOME . "/.vimrc"`' ```
* Merge pull request #3994 from sethjackson/pathextJustin M. Keyes2016-02-01
|\ | | | | Windows: use $PATHEXT to find executables in path
| * Windows: use $PATHEXT to find executables in path.Rui Abreu Ferreira2016-01-30
| | | | | | | | | | | | | | | | | | | | | | is_executable_in_path() searches for executables in $PATH, but on Windows executable files have extensions available in the environment var $PATHEXT. This commit changes is_executable_in_path() to append those extensions to the filename. This patch diverges from standard Vim, in that Vim only checked for the given filename if it already has an extensions. This one always checks for the given filename.
* | Merge pull request #4024 from sethjackson/io-includeJustin M. Keyes2016-02-01
|\ \ | | | | | | Windows: include <io.h>
| * | Windows: include <io.h>.Rui Abreu Ferreira2016-01-17
| | | | | | | | | | | | | | | | | | | | | if_csope.c uses _open_osfhandle so include the necessary header. Futher we need <io.h> for read/write/close/lseek. See: https://msdn.microsoft.com/en-us/library/bdts1c9x.aspx
* | | config: Remove HAVE_UNISTD_H.Seth Jackson2016-01-18
| |/ |/| | | | | | | | | | | | | | | Unix systems must have this header but Windows does not have it at all. Since src/nvim/os/unix_defs.h includes <unistd.h> without the guard in order to avoid including this in the numerous places we would need <unistd.h> on Unix we just include src/nvim/os/os.h which will pull in <unistd.h> for us.
* | Windows: Include <uv.h> for S_IFLNK.Rui Abreu Ferreira2016-01-17
|/ | | | S_IFLNK is not defined on Windows but libuv defines it for us.
* os/win_defs.h: Define O_NOFOLLOWMichael Reed2016-01-16
| | | | It's not present on Windows; see the discussion in #4024.
* misc: UNIX => Unix #4022Seth Jackson2016-01-16
| | | | | | | | | | Although UNIX is a registered trademark of The Open Group, it doesn't really matter whether we refer to these systems as UNIX, Unix, or Unix-like. So, for consistency, refer to them collectively as Unix. Related: http://www.greens.org/about/unix.html http://www.unixica.com/html/unixunix.html
* doc: Remove more references to MS-DOSSeth Jackson2016-01-16
| | | | | | Among other things, this includes: - lies about command.com - references to pcterm
* Misc. macro cleanupMichael Reed2016-01-14
| | | | | | | | | | - ROOT_UID's comment is misleading, as it's always defined to 0. - SEEK_{SET,END} & O_NOFOLLOW should already be defined on Unix-like systems in <stdio.h> and <fcntl.h>, respectively. In any case, neither of those #ifdef blocks should be in the middle of source files. - The S_IS{LNK,DIR,...} macros should only be undefined on Windows.
* Windows: Undefine the Windows RGB macro.Rui Abreu Ferreira2016-01-14
| | | | | | | Windows provides a RGB macro but we have our own in macros.h. Undefine the Windows one before including macros.h. See: https://msdn.microsoft.com/en-us/library/dd162937%28v=vs.85%29.aspx
* vim-patch:7.4.569/573Shougo Matsushita2016-01-13
| | | | | | | | | | | | | | | | | vim-patch:7.4.569 vim-patch:7.4.573 Helped-by: @glts https://github.com/neovim/neovim/pull/2621 Problem: Having CTRL-C interrupt or not does not check the mode of the mapping. (Ingo Karkat) Solution: Use a bitmask with the map mode. (Christian Brabandt) https://github.com/vim/vim/commit/651863c94a882a97aec7968fc87a638ff78e56ff Problem: Mapping CTRL-C in Visual mode doesn't work. (Ingo Karkat) Solution: Call get_real_state() instead of using State directly. https://github.com/vim/vim/commit/5000869712f799d9ca25c0e45dc21d332edae5f4
* os/*_defs.h: MAXNAMLEN cleanupMichael Reed2016-01-12
| | | | | | | | | | | | | For non-Windows systems, we assume that NAME_MAX is in <limits.h>, as specified in POSIX.1-2008[1]. For Windows, which doesn't have NAME_MAX, just define it ourselves to _MAX_PATH[2]. Also, remove two (now unused) HAVE_*_H checks. [1]: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/limits.h.html [2]: https://msdn.microsoft.com/en-us/library/930f87yf.aspx Helped-by: Seth Jackson
* Windows: use ';' as env $PATH separator.Rui Abreu Ferreira2016-01-11
| | | | | | In Windows the separator character in the PATH environment is ';' instead of ':'. Add a new define ENV_SEPCHAR to be used instead of hardcoding the character literal.
* Merge pull request #3980 from ZyX-I/shell-unquoteJustin M. Keyes2016-01-10
|\ | | | | shell: Unquote &shell* options before using them
| * shell: Unquote &shell* options before using themZyX2016-01-11
| |
* | Windows: define MAXNAMLEN for Windows.Seth Jackson2016-01-10
|/ | | | | MAXNAMLEN can be defined using _MAX_PATH from stdlib.h which will fix the BASENAMELEN definition too.
* Fix S_ISLNK definition in os_defs.h.Seth Jackson2016-01-03
|
* Windows: Bring back code branch for if_cscope.Rui Abreu Ferreira2016-01-01
| | | | | The Vim code for windows in if_cscope.c/.h was removed during the refactor, added missing code for error_closing().
* Windows: Make the os_get_uname argument portable.Seth Jackson2016-01-01
| | | | | | Since uid_t is not defined on Windows use uv_uid_t instead. We now use uv_uid_t everywhere except one place in src/nvim/main.c which is wrapped in a #ifdef UNIX check.
* Port fsync() to libuv.Seth Jackson2016-01-01
|