Commit Graph

641 Commits

Author SHA1 Message Date
watiko
119545190c vim-patch:7.4.786
Problem:    It is not possible for a plugin to adjust to a changed setting.
Solution:   Add the OptionSet autocommand event. (Christian Brabandt)

537443018d
2015-11-28 17:22:28 +09:00
Michael Reed
53ee6425c8 src/*: Remove VIM - Vi improved ... header
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.
2015-11-27 16:25:10 -05:00
Rui Abreu Ferreira
4f24b9e06f Remove unnecessary includes for errno.h 2015-11-25 16:38:33 -05:00
Michael Reed
af5483089e src: README.txt -> README.md
The former no longer exists in this repo; see the top of
src/nvim/README.md.
2015-11-23 21:38:08 -05:00
Marco Hinz
9fcd444036 Add TermClose event
A terminal buffer now exits with: [Process exited <return value>]

You can hook into it. E.g.  :au TermClose * call feedkeys('<cr>')

Closes #2293.
2015-11-15 15:10:02 +01:00
Marco Hinz
3b12bb225a Add file selection prompt on ":oldfiles!"
:browse was removed for good, but some people miss ":browse oldfiles".

The same functionality is now provided by ":oldfiles!".

Helped-by: @Pyrohh
2015-11-10 03:13:31 +01:00
Marco Hinz
1902ee52ef Add ":profile stop"
This writes the logfile and stops profiling.
2015-11-10 02:49:47 +01:00
Thiago de Arruda
df37aa6115 eval: Implement dictionary change notifications 2015-11-09 09:43:30 -03:00
Thiago de Arruda
ba1f327200 eval: Extract find_var_ht_dict from find_var_ht 2015-11-09 09:41:08 -03:00
Thiago de Arruda
80a44c0525 eval: Extract find_ufunc from get_dict_callback 2015-11-09 09:41:08 -03:00
Michael Reed
0c54dc5528 Remove useless FEAT_BROWSE ifdef
The only thing this affected was the return value of
has('browsefilter').
2015-11-01 14:36:23 -05:00
ZyX
d99941777d undo: Do some refactoring
Specifically refactor u_get_undo_file_name which will be modified to
automatically create undo directory and replace `char_u` with `char` in some of
the related functions.
2015-10-29 19:34:25 +03:00
Rui Abreu Ferreira
5161f447f6 Implement server_address_new()
When creating a local socket/pipe (server_start()) Neovim used vim_tempname() to
generate a unique socket path. For Windows UNIX filepaths cannot be used as
pipe names (they must start with \\.\pipe\). This commit replaces the use of
vim_tempname() for server addresses with server_address_new().

server_address_new() generates unique names for local sockets/pipes - for UNIX
it uses vim_tempname(), for Windows generates names in the form

    \\.\pipe\nvim-PID-COUNTER

where PID is the current process id, and COUNTER is a static uint32_t counter
incremented with every call. This function is now used for server_start() and
server_init() when no address is available.
2015-10-18 16:34:54 +01:00
ZyX
ad7b7716bb *: Fix lint errors found in new code in previously ignored files 2015-10-08 22:00:50 +03:00
ZyX
127e63fc17 shada: Use same iteration end conditions as with other iterators 2015-10-08 22:00:49 +03:00
ZyX
b87c65d7b9 eval: Use proper iteration end condition 2015-10-08 22:00:48 +03:00
ZyX
aa4d0bb728 eval: Reorder checks in var_shada_iter 2015-10-08 22:00:48 +03:00
ZyX
f59ef120e1 eval: Remove incorrect NONNULL_RET attributes 2015-10-08 22:00:47 +03:00
ZyX
2ba138b2f9 *: Fix problems with clang+asan Release build 2015-10-08 22:00:47 +03:00
ZyX
804e074096 eval,functests: Reference all additional_* items created by ShaDa 2015-10-08 22:00:45 +03:00
ZyX
07d9ab26c6 *: Make ShaDa code use VimL values for additional_\* data 2015-10-08 22:00:16 +03:00
ZyX
244dbe3a77 viminfo: First version of ShaDa file dumping
What works:

1. ShaDa file dumping: header, registers, jump list, history, search patterns,
   substitute strings, variables.
2. ShaDa file reading: registers, global marks, variables.

Most was not tested.

TODO:

1. Merging.
2. Reading history, local marks, jump and buffer lists.
3. Documentation update.
4. Converting some data from &encoding.
5. Safer variant of dumping viminfo (dump to temporary file then rename).
6. Removing old viminfo code (currently masked with `#if 0` in a ShaDa file for
   reference).
2015-10-08 21:59:51 +03:00
ZyX
b6fdb7bd0f eval/string(): Share code between msgpackdump() and string()+:echo 2015-09-30 10:12:35 +03:00
ZyX
6da3fadd9f eval/msgpackdump(): Use copyID for protecting against recursive input
Should be faster then O(depth) iteration, but removes const qualifiers.
2015-09-30 10:09:21 +03:00
ZyX
924058c00f eval/msgpackparse(): Fix crash by adding return at error 2015-09-19 01:54:43 +03:00
Thiago de Arruda
b7dab423ef eval: Fix ex_delfunction to use the uf_refcount field properly
@4b98ea1e80bf changed how refcounts are handled internally to fit into job
control semantics. Change the refcount check in `ex_delfunction` to consider
this. Close #3000
2015-09-18 14:35:26 -03:00
oni-link
6ea21f5668 vim-patch:7.4.609
Problem:    For complicated list and dict use the garbage collector can run
            out of stack space.
Solution:   Use a stack of dicts and lists to be marked, thus making it
            iterative instead of recursive. (Ben Fritz)

2459a5ecaa
2015-09-07 13:03:15 +02:00
Mathieu Xhonneux
79b6ab21d8 termopen(): remove name feature. #3181
Problem:  Commands like `:e term://top` display `term://.//PID:(null)`
instead of `term://.//PID:top`.

Solution: Remove the optional `name` argument (it allowed
ambiguous/potentially destructive cases, so it was problematic anyway).

Closes #3113
Closes #2924
2015-08-30 17:15:50 -04:00
Seth Jackson
b9d17c6a8a Windows: avoid "uv_" naming conflicts. #3225 2015-08-27 21:47:49 -04:00
Justin M. Keyes
b2ece148e6 vim-patch:7.4.836 #3244
Problem:    Accessing unitinialized memory.
Solution:   Add missing calls to init_tv(). (Dominique Pelle)

0a38dd29d6
2015-08-26 11:55:29 +02:00
Rui Abreu Ferreira
5090d94699 Windows: Add has('win32'). #3223
References #810
2015-08-23 14:52:03 -04:00
Thiago de Arruda
1beee0685d eval: Protect job callbacks from being redefined
ref: #3188
2015-08-21 13:28:49 -03:00
James McCoy
f6f28c18e5 7.4.813
patch 7.4.813
Problem: It is not possible to save and restore character search state.
Solution: Add getcharsearch() and setcharsearch().  (James McCoy)

https://github.com/vim/vim/releases/tag/v7.4.813
https://github.com/vim/vim/releases/tag/v7.4.826

Signed-off-by: James McCoy <vega.james@gmail.com>
2015-08-20 10:32:25 -04:00
Justin M. Keyes
3ce1b4015f fs.c: implement os_file_is_readable()
Use access() because:

- We already use it for os_file_is_writable()
- Vim's old check_file_readonly() ends up using access() after all.
2015-08-17 01:06:00 -04:00
Thiago de Arruda
f1de097dbb eval: Fix jobwait() to process multiple jobs concurrently
The new event processing architecture changed `jobwait()` semantics: Only one
job is processed at time since process_wait only focuses on one queue.

This fixes the problem with a few changes:

- Allow the event queue polled by `process_wait` to be overriden by a new
  argument.
- Allow the parent queue to be overriden with `queue_replace_parent`
- Create a temporary queue that serves as the parent for all jobs passed to
  `jobwait()`
2015-08-13 11:53:19 -03:00
Thiago de Arruda
6b3cd381dc rstream: Pass read count to read events
This is necessary to keep events in the same order received from the OS.
2015-08-13 08:52:17 -03:00
oni-link
166d8c799f process: Remove indeterminism that causes reordering of pty events
Since pty events are queued, it is possible that the reads will be reordered.
Example scenario:

In the terminal you have output combined from stdout and stderr. A program
generates output, first you have some output on stdout, then output on stderr,
output on stdout, output on stderr,...  The whole output should be interleaved
from both streams.

Each output generates a read_event and they are placed in the same queue. If the
queue is processed, the first read_event will send the whole stdout output to
the terminal (on_job_output() consumes the whole buffer). The next read_event is
similar for stderr. The remaining read events do nothing because now both
RBuffer are already empty. So the terminal would show first the stdout output
and after that the stderr output.

This commit fixes the problem by disabling stderr stream in pty processes.
That's ok because they all represent the same stream(duplicate file
descriptors), plus one stream is simpler to deal with.
2015-08-13 08:52:17 -03:00
Thiago de Arruda
502aee690c event: Refactor async event processing
- Improve the implementation of deferred/immediate events.
- Use the new queue module to change how/when events are queued/processed by
  giving a private queue to each emitter.
- Immediate events(which only exist to break uv_run recursion) are now
  represented in the `loop->fast_events` queue.
- Events pushed to child queues are propagated to the event loop main queue and
  processed as K_EVENT keys.
2015-08-13 08:49:38 -03:00
Thiago de Arruda
696f9c2759 process: Pass loop reference during initialization
Change the API so that it is passed to {uv,pty}_process_init instead of
`process_spawn`.
2015-08-13 07:41:04 -03:00
Thiago de Arruda
024b1f39a3 eval: Fixes to job control
- Ensure TerminalJobData is freed in case of error when spawning pty jobs
- Check if job was stopped in every function that receives a job id.
2015-08-13 07:41:04 -03:00
ZyX
172272ef3f eval: Use proper refcount of msgpack type lists 2015-08-05 22:50:46 +03:00
Justin M. Keyes
9f350e615c Merge pull request #3034 from ZyX-I/msgpack-eval
msgpack viml functions for dump/restore
2015-08-03 00:24:10 -04:00
ZyX
401ae724ea eval: Call list_append_allocated_string from list_append_string 2015-08-02 20:38:09 +03:00
ZyX
ec95a58377 vim_to_msgpack: Silence -Werror=unitialized compiler error
Compiler warning was found in [QuickBuild logs][1] from [this page][2]. GCC and
clang on travis appear to be fine. Relevant log parts:

    Step Log (master>buildall>build-node?testNode=linux-64>build-and-run-tests>build-and-run-tests-parameterized?buildType=Release>configure-neovim-and-build-nvim)
    <…>
    16:26:31,364 WARN  - /home/quickbuild/buildagent/workspace/root/neovim/pull-requests-automated/src/nvim/eval.c: In function ‘f_msgpackdump’:
    16:26:31,364 WARN  - /home/quickbuild/buildagent/workspace/root/neovim/pull-requests-automated/src/nvim/eval.c:12371:26: error: ‘cur_tv’ may be used uninitialized in this function [-Werror=uninitialized]
    16:26:31,364 WARN  - /home/quickbuild/buildagent/workspace/root/neovim/pull-requests-automated/src/nvim/eval.c:12328:21: note: ‘cur_tv’ was declared here
    16:26:31,938 WARN  - cc1: all warnings being treated as errors

[1]: http://neovim-qb.szakmeister.net/wicket/page?4-1.ILinkListener-content-buildTab-panel-errorContainer-steps-5-logLink
[2]: http://neovim-qb.szakmeister.net/build/2099/overview
2015-08-02 19:32:41 +03:00
ZyX
7fbefd585e eval: Remove most of msgpack* functions limitations 2015-08-02 19:32:41 +03:00
ZyX
5a7135fa1c eval: Add msgpackparse and msgpackdump functions 2015-08-02 19:32:41 +03:00
ZyX
1206ac953f os/fs: Move mkdir_recurse from eval.c to os/fs.c 2015-07-26 02:34:32 +03:00
Wander Nauta
bf9f50942d eval.c: Only inline float_op_wrapper on non-i386 #3072
glibc on i386 seems to have an optimization that makes it harder to call
some math functions indirectly from inside an inlined function, causing
compile-time errors with some versions of gcc.  This removes inlining on
that platform.

Closes #3071
2015-07-21 18:49:16 -04:00
Sebastian Witte
fcb79ffc40 Implement API function to call functions #2979
Remove static modifier from func_call
Move MAX_FUNC_ARGS definnition from eval.c to eval.h
2015-07-19 17:18:31 +02:00
Marco Hinz
84ce97714b synIDattr(): true color awareness
In Vim, which doesn't true colors, synIDattr('Foo', 'fg') returns either
ctermfg or guifg depending on whether vim or gvim is running.

True colors naturally use GUI colors, so synIDattr() has to be adapted to
return guifg, if a TUI with enabled true colors is used.
2015-07-18 16:55:25 +02:00