diff options
-rw-r--r-- | README.md | 10 | ||||
-rw-r--r-- | runtime/doc/eval.txt | 4 | ||||
-rw-r--r-- | runtime/doc/help.txt | 1 | ||||
-rw-r--r-- | runtime/doc/os_unix.txt | 57 | ||||
-rw-r--r-- | runtime/doc/various.txt | 2 | ||||
-rw-r--r-- | src/nvim/os/fs.c | 5 | ||||
-rw-r--r-- | src/nvim/tui/tui.c | 1 | ||||
-rw-r--r-- | src/nvim/ui_bridge.c | 19 | ||||
-rw-r--r-- | src/nvim/ui_bridge.h | 4 |
9 files changed, 32 insertions, 71 deletions
@@ -29,10 +29,12 @@ For lots more details, see ### What's been done so far -- [Terminal emulator](http://neovim.io/doc/user/nvim_terminal_emulator.html) -- [Job control](https://github.com/neovim/neovim/pull/2247) -- MessagePack-based remote API -- Performance, reliability, portability +- Automatic [history merge](https://github.com/neovim/neovim/pull/2506) between multiple editor instances +- [XDG-compliant](https://github.com/neovim/neovim/pull/3470) configuration +- Embedded [terminal emulator](https://neovim.io/doc/user/nvim_terminal_emulator.html) +- Asynchronous [job control](https://github.com/neovim/neovim/pull/2247) +- [MessagePack](https://msgpack.org) remote API +- [Pushdown automaton](https://github.com/neovim/neovim/pull/3413) for state transitions See the [progress page](https://github.com/neovim/neovim/wiki/Progress) for a comprehensive list. diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 06082774cf..33ee5b78c1 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -391,7 +391,7 @@ example, to add up all the numbers in a list: > 1.4 Dictionaries ~ - *dict* *Dictionaries* *Dictionary* + *Dict* *dict* *Dictionaries* *Dictionary* A Dictionary is an associative array: Each entry has a key and a value. The entry can be located with the key. The entries are stored without a specific ordering. @@ -6888,7 +6888,6 @@ fname_case Case in file names matters (for MS-DOS and Windows this is not present). folding Compiled with |folding| support. footer Compiled with GUI footer support. |gui-footer| -fork Compiled to use fork()/exec() instead of system(). gettext Compiled with message translation |multi-lang| gui Compiled with GUI enabled. gui_athena Compiled with Athena GUI. @@ -6947,7 +6946,6 @@ statusline Compiled with support for 'statusline', 'rulerformat' syntax Compiled with syntax highlighting support |syntax|. syntax_items There are active syntax highlighting items for the current buffer. -system Compiled to use system() instead of fork()/exec(). tag_binary Compiled with binary searching in tags files |tag-binary-search|. tag_old_static Compiled with support for old static tags diff --git a/runtime/doc/help.txt b/runtime/doc/help.txt index e1c05365f7..76903d50a5 100644 --- a/runtime/doc/help.txt +++ b/runtime/doc/help.txt @@ -161,7 +161,6 @@ Versions ~ *sys-file-list* Remarks about specific systems ~ |os_mac.txt| Macintosh -|os_unix.txt| Unix |os_win32.txt| MS-Windows *standard-plugin-list* Standard plugins ~ diff --git a/runtime/doc/os_unix.txt b/runtime/doc/os_unix.txt deleted file mode 100644 index 604fa5827a..0000000000 --- a/runtime/doc/os_unix.txt +++ /dev/null @@ -1,57 +0,0 @@ -*os_unix.txt* For Vim version 7.4. Last change: 2005 Mar 29 - - - VIM REFERENCE MANUAL by Bram Moolenaar - - - *unix* *Unix* -This file contains the particularities for the Unix version of Vim. - -For compiling Vim on Unix see "INSTALL" and "Makefile" in the src directory. - -The default help file name is "/usr/local/lib/vim/help.txt" The files -"$HOME/.vimrc" and "$HOME/.exrc" are used for configuration. Additionally -"/usr/local/etc/vimrc" is used first. If "/usr/local/share" exists it is used -instead of "/usr/local/lib". - -Temporary files (for filtering) are put in "/tmp". If you want to place them -somewhere else, set the environment variable $TMPDIR to the directory you -prefer. - -With wildcard expansion you can use '~' (home directory) and '$' -(environment variable). - - *fork* *spoon* -For executing external commands fork()/exec() is used when possible, otherwise -system() is used, which is a bit slower. The output of ":version" includes -|+fork| when fork()/exec() is used, |+system()| when system() is used. This -can be changed at compile time. - -Because terminal updating under Unix is often slow (e.g. serial line -terminal, shell window in suntools), the 'showcmd' and 'ruler' options -are off by default. - -When using Vim in an xterm the mouse clicks can be used by Vim by setting -'mouse' to "a". If there is access to an X-server gui style copy/paste will -be used and visual feedback will be provided while dragging with the mouse. -If you then still want the xterm copy/paste with the mouse, press the shift -key when using the mouse. See |mouse-using|. - - *terminal-colors* -To use colors in Vim you can use the following example (if your terminal -supports colors, but "T_Co" is empty or zero): > - :set t_me=^[[0;1;36m " normal mode (undoes t_mr and t_md) - :set t_mr=^[[0;1;33;44m " reverse (invert) mode - :set t_md=^[[1;33;41m " bold mode - :set t_se=^[[1;36;40m " standout end - :set t_so=^[[1;32;45m " standout mode - :set t_ue=^[[0;1;36m " underline end - :set t_us=^[[1;32m " underline mode start -[the ^[ is an <Esc>, type CTRL-V <Esc> to enter it] - -For real color terminals the ":highlight" command can be used. - -The file "tools/vim132" is a shell script that can be used to put Vim in 132 -column mode on a vt100 and lookalikes. - - vim:tw=78:ts=8:ft=help:norl: diff --git a/runtime/doc/various.txt b/runtime/doc/various.txt index d34c0516e2..1b95cfe7d0 100644 --- a/runtime/doc/various.txt +++ b/runtime/doc/various.txt @@ -332,7 +332,6 @@ N *+find_in_path* include file searches: |[I|, |:isearch|, |CTRL-W_CTRL-I|, |:checkpath|, etc. N *+folding* |folding| *+footer* |gui-footer| - *+fork* Unix only: |fork| shell commands N *+gettext* message translations |multi-lang| *+GUI_Athena* Unix only: Athena |GUI| *+GUI_neXtaw* Unix only: neXtaw |GUI| @@ -377,7 +376,6 @@ N *+startuptime* |--startuptime| argument N *+statusline* Options 'statusline', 'rulerformat' and special formats of 'titlestring' and 'iconstring' N *+syntax* Syntax highlighting |syntax| - *+system()* Unix only: opposite of |+fork| N *+tag_binary* binary searching in tags file |tag-binary-search| N *+tag_old_static* old method for static tags |tag-old-static| m *+tag_any_white* any white space allowed in tags file |tag-any-white| diff --git a/src/nvim/os/fs.c b/src/nvim/os/fs.c index 05f0f53c63..3fb00eb24e 100644 --- a/src/nvim/os/fs.c +++ b/src/nvim/os/fs.c @@ -140,9 +140,8 @@ static bool is_executable(const char_u *name) static bool is_executable_in_path(const char_u *name, char_u **abspath) FUNC_ATTR_NONNULL_ARG(1) { - const char *path = getenv("PATH"); - // PATH environment variable does not exist or is empty. - if (path == NULL || *path == NUL) { + const char *path = os_getenv("PATH"); + if (path == NULL) { return false; } diff --git a/src/nvim/tui/tui.c b/src/nvim/tui/tui.c index c5f2950e62..02efa1f8df 100644 --- a/src/nvim/tui/tui.c +++ b/src/nvim/tui/tui.c @@ -219,6 +219,7 @@ static void tui_main(UIBridgeData *bridge, UI *ui) loop_poll_events(&tui_loop, -1); } + ui_bridge_stopped(bridge); term_input_destroy(&data->input); signal_watcher_stop(&data->cont_handle); signal_watcher_close(&data->cont_handle, NULL); diff --git a/src/nvim/ui_bridge.c b/src/nvim/ui_bridge.c index 836339a887..359fffe3bf 100644 --- a/src/nvim/ui_bridge.c +++ b/src/nvim/ui_bridge.c @@ -74,6 +74,13 @@ UI *ui_bridge_attach(UI *ui, ui_main_fn ui_main, event_scheduler scheduler) return &rv->bridge; } +void ui_bridge_stopped(UIBridgeData *bridge) +{ + uv_mutex_lock(&bridge->mutex); + bridge->stopped = true; + uv_mutex_unlock(&bridge->mutex); +} + static void ui_thread_run(void *data) { UIBridgeData *bridge = data; @@ -82,8 +89,18 @@ static void ui_thread_run(void *data) static void ui_bridge_stop(UI *b) { - UI_CALL(b, stop, 1, b); UIBridgeData *bridge = (UIBridgeData *)b; + bool stopped = bridge->stopped = false; + UI_CALL(b, stop, 1, b); + for (;;) { + uv_mutex_lock(&bridge->mutex); + stopped = bridge->stopped; + uv_mutex_unlock(&bridge->mutex); + if (stopped) { + break; + } + loop_poll_events(&loop, 10); + } uv_thread_join(&bridge->ui_thread); uv_mutex_destroy(&bridge->mutex); uv_cond_destroy(&bridge->cond); diff --git a/src/nvim/ui_bridge.h b/src/nvim/ui_bridge.h index 76e9e27989..31b9a69216 100644 --- a/src/nvim/ui_bridge.h +++ b/src/nvim/ui_bridge.h @@ -22,6 +22,10 @@ struct ui_bridge_data { // the call returns. This flag is used as a condition for the main // thread to continue. bool ready; + // When a stop request is sent from the main thread, it must wait until the UI + // thread finishes handling all events. This flag is set by the UI thread as a + // signal that it will no longer send messages to the main thread. + bool stopped; }; #define CONTINUE(b) \ |