aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/main.c
Commit message (Collapse)AuthorAge
...
* | 'guicursor': Disable by default for unknown terminals.Justin M. Keyes2017-04-04
| | | | | | | | | | | | | | User can still set guicursor explicitly in init.vim. Closes #5990 Closes #6403
* | *: Move some dictionary functions to typval.h and use char*ZyX2017-03-29
| | | | | | | | Also fixes buffer reusage in setmatches() and complete().
* | eval: Split eval.c into smaller filesZyX2017-03-29
| |
* | vim-patch:7.4.2164 (#6326)Justin M. Keyes2017-03-21
|/ | | | | | | | | | | | | | | | | | | | | Problem: It is not possible to use plugins in an "after" directory to tune the behavior of a package. Solution: First load plugins from non-after directories, then packages and finally plugins in after directories. Reset 'loadplugins' before executing --cmd arguments. https://github.com/vim/vim/commit/66459b7c98c67f8a9d39de8f08e8e8f1fca0e359 vim-patch:7.4.2172 vim-patch:7.4.2169 vim-patch:7.4.2177 vim-patch:7.4.2178 vim-patch:7.4.2184 vim-patch:8.0.0050 vim-patch:8.0.0105 vim-patch:8.0.0400 vim-patch:8.0.0405 Closes #6034
* clipboard: set v:register after startup (#5708)Björn Linse2017-03-18
| | | Fixes #5697
* *: Fix linter errorsZyX2017-02-23
|
* buffer: Bind b:changedtick to b:['changedtick'], remove special casesZyX2017-02-23
|
* vim-patch:7.4.1727Michael Ennen2017-02-14
| | | | | | | | Problem: Cannot detect a crash in tests when caused by garbagecollect(). Solution: Add garbagecollect_for_testing(). Do not free a job if is still useful. https://github.com/vim/vim/commit/ebf7dfa6f121c82f97d2adca3d45fbaba9ad8f7e
* Merge pull request #5913 from mhinz/buf-lookup-patchesJames McCoy2017-02-06
|\ | | | | vim-patch:7.4.2017,7.4.2018,7.4.2021,7.4.2022,7.4.2023,7.4.2024
| * vim-patch:7.4.2024Marco Hinz2017-02-04
| | | | | | | | | | | | | | | | | | | | Problem: More buf_valid() calls can be optimized. Solution: Use bufref_valid() instead. NOTE: Some changes related to channels and the Python and Netbeans interfaces were obviously left out. https://github.com/vim/vim/commit/7c0a2f367f2507669560b1a66423155c70d2e75b
* | win: Append process dir to $PATHJustin M. Keyes2017-02-04
|/ | | | | | | | This allows executables to be found by :!, system(), and executable() if they live next to ("sibling" to) nvim.exe. This is what gvim on Windows does, and also matches the behavior of Win32 SearchPath(). https://github.com/vim/vim/blob/c4a249a736d40ec54794827ef95804c225d0e38f/src/os_win32.c#L354-L370
* vim-patch:7.4.1909 (#5748)Shougo2016-12-10
| | | | | | Problem: Doubled semicolons. Solution: Reduce to one. (Dominique Pelle) https://github.com/vim/vim/commit/945ec093cd4ddefab930239990564b12eb232153
* os/shell: Throttle :! output, pulse "..." message.Justin M. Keyes2016-12-09
| | | | | | | | | | | | | | | | | | | | | | | | | | Periodically skip :! spam. This is a "cheat" that works for all UIs and greatly improves responsiveness when :! spams MB or GB of output: :!yes :!while true; do date; done :!git grep '' :grep -r '' * After ~10KB of data is seen from a single :! invocation, output will be skipped for ~1s and three dots "..." will pulse in the bottom-left. Thereafter the behavior alternates at every: * 10KB received * ~1s throttled This also avoids out-of-memory which could happen with large :! outputs. Note: This commit does not change the behavior of execute(':!foo'). execute(':!foo') returns the string ':!foo^M', it captures *only* Vim messages, *not* shell command output. Vim behaves the same way. Use system('foo') for capturing shell command output. Closes #1234 Helped-by: oni-link <knil.ino@gmail.com>
* Add v:exitingMarco Hinz2016-12-01
| | | | | | | | | Contains the exit value nvim will use. Before exiting, it is v:null. That way jobs or autocmds (in VimLeavePre or VimLeave) can check if Neovim is about to quit and with what exit value. Closes #4666.
* lintJames McCoy2016-11-14
|
* vim-patch:7.4.1658James McCoy2016-11-14
| | | | | | | | Problem: A plugin does not know when VimEnter autocommands were already triggered. Solution: Add the v:vim_did_enter variable. https://github.com/vim/vim/commit/1473551a4457d4920b235eeeb9f279e196ee7225
* encoding: cleanup mbyte.c given fixed encoding=utf-8Björn Linse2016-11-05
| | | | | | | | | Eliminate mb_init(): Set "enc_utf" and "has_mbyte" early. Eliminate "enc_unicode" and "enc_latin1like". init_chartab() and screenalloc() are already invoked elsewhere in the initialization process. The EncodingChanged autocmd cannot be triggered. At initialization, there is no spellfiles to reload
* startup: Remove 'N files to edit' message. #5481Linda_pp2016-10-14
| | | | | | | | | | Problem: When '--embed' passed to command line arguments, stdin and stdout are used for IPC. But when multiple files are passed as arguments, nvim wrongly sends 'N files to edit' message to its stdout. As the result, attaching to process from frontend failed. Solution: Remove the message because it doesn't fill any purpose.
* main.c: "BufReadCmd term://": Skip existing terminal.Justin M. Keyes2016-10-12
| | | | | | | | | Check `exists('b:term_title')` to avoid the BufReadCmd for already-initialized :terminal buffers. Move the test for `:argadd`. Add a test for `:edit<CR>`. Tweak comments and code style.
* event/multiqueue.c: Rename "queue" to "multiqueue".Justin M. Keyes2016-10-02
| | | | | | | | | | | | | | `lib/queue.h` implements a basic queue. `event/queue.c` implements a specialized data structure on top of lib/queue.h; it is not a "normal" queue. Rename the specialized multi-level queue implemented in event/queue.c to "multiqueue", to avoid confusion when reading the code. Before this change one can eventually notice that "macros (uppercase symbols) are for the normal queue, lowercase operations are for the multi-level queue", but that is unnecessary friction for new developers (or existing developers just visiting this part of the codebase).
* tui.c: Do not wait for tui loop on teardown. (#4789)Justin M. Keyes2016-09-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because terminfo_stop() already ran, there is not much reason to wait for the loop to teardown. Helped-by: Björn Linse <bjorn.linse@gmail.com> Helped-by: oni-link <knil.ino@gmail.com> Closes #4778 References #3541 --- Bug report: > After pressing `ZZ` I can find two threads freezing, occupying 100% CPU: |-systemd-+ |-nvim,11567 /home/lz/code/1.rs +set title | `-{nvim},11574 > 11567 has two threads: (gdb) info threads Id Target Id Frame * 1 Thread 0x7f7622907780 (LWP 11567) "nvim" 0x00007f76222e66bd in pthread_join () from /usr/lib/libpthread.so.0 2 Thread 0x7f761f5ff700 (LWP 11574) "nvim" 0x00007ffcec9e9c59 in clock_gettime () (gdb) thread apply all bt Thread 2 (Thread 0x7f761f5ff700 (LWP 11574)): #0 0x00007ffcec9e9c59 in clock_gettime () #1 0x00007f76210b9356 in clock_gettime () from /usr/lib/libc.so.6 #2 0x00007f7622513e3c in ?? () from /usr/lib/libuv.so.1 #3 0x00007f7622505e94 in uv_run () from /usr/lib/libuv.so.1 #4 0x00000000004822ed in loop_close (loop=loop@entry=0x7f761f5fe870) at /tmp/yaourt-tmp-lz/aur-neovim-git/src/neovim-git/src/nvim/event/loop.c:87 #5 0x00000000005a7ec0 in tui_main (bridge=0x7f761f6ac000, ui=0x7f761f69ace0) at /tmp/yaourt-tmp-lz/aur-neovim-git/src/neovim-git/src/nvim/tui/tui.c:234 #6 0x00000000005a9b47 in ui_thread_run (data=<optimized out>) at /tmp/yaourt-tmp-lz/aur-neovim-git/src/neovim-git/src/nvim/ui_bridge.c:87 #7 0x00007f7622510d07 in ?? () from /usr/lib/libuv.so.1 #8 0x00007f76222e5474 in start_thread () from /usr/lib/libpthread.so.0 #9 0x00007f76210ac69d in clone () from /usr/lib/libc.so.6 Thread 1 (Thread 0x7f7622907780 (LWP 11567)): #0 0x00007f76222e66bd in pthread_join () from /usr/lib/libpthread.so.0 #1 0x00007f7622510dae in uv_thread_join () from /usr/lib/libuv.so.1 #2 0x00000000005aac9e in ui_bridge_stop (b=0x7f761f6ac000) at /tmp/yaourt-tmp-lz/aur-neovim-git/src/neovim-git/src/nvim/ui_bridge.c:104 #3 0x00000000005a90e4 in ui_builtin_stop () at /tmp/yaourt-tmp-lz/aur-neovim-git/src/neovim-git/src/nvim/ui.c:91 #4 0x000000000052be09 in mch_exit (r=r@entry=1) at /tmp/yaourt-tmp-lz/aur-neovim-git/src/neovim-git/src/nvim/os_unix.c:143 #5 0x00000000004db1cc in getout (exitval=exitval@entry=1) at /tmp/yaourt-tmp-lz/aur-neovim-git/src/neovim-git/src/nvim/main.c:623 #6 0x00000000004fa43c in preserve_exit () at /tmp/yaourt-tmp-lz/aur-neovim-git/src/neovim-git/src/nvim/misc1.c:2652 #7 0x000000000052b77a in deadly_signal (signum=1) at /tmp/yaourt-tmp-lz/aur-neovim-git/src/neovim-git/src/nvim/os/signal.c:120 #8 0x000000000052b7cf in on_signal (handle=<optimized out>, signum=<optimized out>, data=<optimized out>) at /tmp/yaourt-tmp-lz/aur-neovim-git/src/neovim-git/src/nvim/os/signal.c:145 #9 0x0000000000484178 in signal_event (argv=<optimized out>) at /tmp/yaourt-tmp-lz/aur-neovim-git/src/neovim-git/src/nvim/event/signal.c:44 #10 0x0000000000483b7f in queue_process_events (queue=0x7f7620417360) at /tmp/yaourt-tmp-lz/aur-neovim-git/src/neovim-git/src/nvim/event/queue.c:142 #11 0x0000000000482208 in loop_poll_events (loop=0x84dec0 <loop>, ms=ms@entry=4000) at /tmp/yaourt-tmp-lz/aur-neovim-git/src/neovim-git/src/nvim/event/loop.c:56 #12 0x000000000052a364 in input_poll (ms=ms@entry=4000) at /tmp/yaourt-tmp-lz/aur-neovim-git/src/neovim-git/src/nvim/os/input.c:325 #13 0x000000000052a3e2 in inbuf_poll (ms=4000) at /tmp/yaourt-tmp-lz/aur-neovim-git/src/neovim-git/src/nvim/os/input.c:347 #14 0x000000000052a839 in os_inchar (buf=buf@entry=0x0, maxlen=maxlen@entry=0, ms=ms@entry=-1, tb_change_cnt=tb_change_cnt@entry=0) at /tmp/yaourt-tmp-lz/aur-neovim-git/src/neovim-git/src/nvim/os/input.c:107 #15 0x0000000000592eeb in state_enter (s=s@entry=0x7ffcec9d3560) at /tmp/yaourt-tmp-lz/aur-neovim-git/src/neovim-git/src/nvim/state.c:46 #16 0x0000000000508533 in normal_enter (cmdwin=cmdwin@entry=false, noexmode=noexmode@entry=false) at /tmp/yaourt-tmp-lz/aur-neovim-git/src/neovim-git/src/nvim/normal.c:464 #17 0x00000000004dc17e in main (argc=<optimized out>, argv=<optimized out>) at /tmp/yaourt-tmp-lz/aur-neovim-git/src/neovim-git/src/nvim/main.c:538
* refactor: eliminate misc2.cJustin M. Keyes2016-09-13
| | | | | | | | | | move `call_shell` to misc1.c Move some fns to state.c Move some fns to option.c Move some fns to memline.c Move `vim_chdir*` fns to file_search.c Move some fns to new module, bytes.c Move some fns to fileio.c
* api: rename "msgpack_rpc/defs.h" to "api/private/dispatch.h" and use the ↵Björn Linse2016-08-31
| | | | header generator.
* Fix vim-patch:7.4.689Rui Abreu Ferreira2016-08-07
|
* vim-patch:7.4.1147 (#5005)prollings2016-07-10
| | | | | | | Problem: Conflict for "chartab". (Kazunobu Kuriyama) Solution: Rename the global one to something less obvious. Move it into src/chartab.c. https://github.com/vim/vim/commit/88e8f9f14434a7cd538d0c159dc432bea869a5bd
* lintJames McCoy2016-07-08
|
* vim-patch:7.4.1552James McCoy2016-07-08
| | | | | | | Problem: ":colorscheme" does not use 'packpath'. Solution: Also use in "start" and "opt" directories in 'packpath'. https://github.com/vim/vim/commit/7f8989dd8a627af2185df381195351a913f3777f
* vim-patch:7.4.1550James McCoy2016-07-08
| | | | | | | Problem: Cannot load packages early. Solution: Add the ":packloadall" command. https://github.com/vim/vim/commit/2d8f56acb32428d0f965d42dd13b27100b46fa15
* vim-patch:7.4.1384James McCoy2016-07-08
| | | | | | | Problem: It is not easy to use a set of plugins and their dependencies. Solution: Add packages, ":loadopt", 'packpath'. https://github.com/vim/vim/commit/f6fee0e2d4341c0c2f5339c1268e5877fafd07cf
* options: Default t_Co to 256.Justin M. Keyes2016-07-02
| | | | | | | | This commit doesn't change any behavior, only moves the init out of main.c We _could_ move some initialization from tui.c:terminfo_start to an earlier phase, in order to avoid mis-reporting 't_Co' during startup. But this will be messy, and gains very little: TERM=linux works "good enough" as long as we correct t_Co in tui.c:terminfo_start (c5b02d5a7).
* vim-patch:7.4.1716Marco Hinz2016-07-01
| | | | | | | Problem: 'autochdir' doesn't work for the first file. (Rob Hoelz) Solution: Call DO_AUTOCHDIR after startup. (Christian Brabandt) https://github.com/vim/vim/commit/baec5c1768098f9dd867b465aaabfdfb294f10c2
* timers: stop all timers on teardownBjörn Linse2016-06-01
|
* *: 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.
* *: Make set_vim_var_\* functions have proper argument typesZyX2016-04-18
|
* defaults: Enable syntax/filetype for real.Justin M. Keyes2016-04-15
| | | | | Fixes a bug in #4252: we enabled filetype/syntax if -u was passed, but not otherwise. So it did not work for an empty or missing vimrc.
* main.c: Free msgpack packer in --api-info handler to make ASAN happyThiago de Arruda2016-04-11
|
* main: Move term:// protocol name to a macrosZyX2016-02-28
|
* main: Make using :edit term:// run TermOpen eventZyX2016-02-28
| | | | Ref #4306
* Revert "Merge pull request #4362 from justinmk/termopen"ZyX2016-02-28
| | | | | This reverts commit b01db02de4753908b3595b5ada0a6929e595e930, reversing changes made to 62321e5132ed29b11f79c8a56ca172d56b9ac042.
* term: publish TermOpen in "e term://" handler.Justin M. Keyes2016-02-23
| | | | | | | | After 87a49405b00b38b58c4c1d8fc4069d1a254a621d, terminal_open() is not nested by default. The default "term://" handler depended on that, but it should instead explicitly raise TermOpen. References #4306
* 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.
* startup: Avoid VimL global. Introduce TriState enum.Justin M. Keyes2016-02-14
| | | | | | | - `syntax_on` is documented. Rather than introduce a new undocumented VimL global `g:syntax_off`, use a module-local flag. - Rename "maybe" functions to follow style guidelines (use standard module prefix)
* startup: respect earlier :filetype and :syntax.Felipe Morales2016-02-14
| | | | | If user invokes :filetype or :syntax before startup defaults are applied, don't clobber their choices.
* ex_docmd: rename force_enable_filetype().Justin M. Keyes2016-02-14
| | | | It is no longer forcing anything.
* syntax: don't override user settingsFelipe Morales2016-02-14
|
* syntax: avoid extra global macroJustin M. Keyes2016-02-14
|
* defaults: Enable syntax and filetype plugins.Felipe Morales2016-02-14
|
* vim-patch:7.4.689watiko2016-02-07
| | | | | | | | | | | | | | Problem: On MS-Windows, when 'autochdir' is set, diff mode with files in different directories does not work. (Axel Bender) Solution: Remember the current directory and use it where needed. (Christian Brabandt) https://github.com/vim/vim/commit/d87c36ea5eae50580f3c733734669250cc969019 --- see: "autochdir + encoding=utf8 messes up diff" https://groups.google.com/d/msg/vim_dev/QrE4Y2LMJR8/uxigns5KGxYJ
* src/*: Remove `VIM - Vi improved ...` headerMichael Reed2015-11-27
| | | | | | | | | | | | | | | | | | | Regarding the individual items in the header: `Vim - Vi improved by Bram Moolenar` Bram Moolenar is already mentioned throughout the documentation, as well as the intro screen. `:help uganda` It's already shown to all users who don't use `shortmess+=I` upon starting nvim, and is already placed prominently in help.txt, i.e., `:help` run with no arguments. `:help credits` Already mentioned near the top of help.txt. `README.md` Already mentioned in develop.txt.
* Remove unnecessary includes for errno.hRui Abreu Ferreira2015-11-25
|