Commit Graph

1467 Commits

Author SHA1 Message Date
Will Stamper
1cdd4ff7f6 vim-patch:7.4.306 #842
Problem:    getchar(0) does not return Esc.
Solution:   Do not wait for an Esc sequence to be complete.  (Yasuhiro
            Matsumoto)

https://code.google.com/p/vim/source/detail?r=05e1d8afcc5e375bf708ccc9810e2fd1a5a8a3cf
2014-07-11 16:42:45 -04:00
Nicolas Hillegeer
94f488d1ca c99: remove vim_round #909
C89 did not have round(), vim emulated it with vim_round. But since we're
using C99 this is not a problem anymore.
2014-07-11 13:10:59 -04:00
Brandon Coleman
0fff487690 move errno.h include out of vim.h 2014-07-09 00:18:20 +02:00
Brandon Coleman
b94d07b046 move stdarg.h include out of vim.h 2014-07-09 00:18:19 +02:00
Brandon Coleman
bf219e1442 move <inttypes.h> include out of vim.h 2014-07-09 00:18:19 +02:00
Brandon Coleman
b18ca14ef8 move locale.h include out of vim.h 2014-07-09 00:18:19 +02:00
Brandon Coleman
82b71a3056 move ascii.h include out of vim.h 2014-07-09 00:18:18 +02:00
Brandon Coleman
a4f441e547 remove stdbool.h include from vim.h and globals.h 2014-07-09 00:18:17 +02:00
Klemen Košir
a568e8b644 Replaced most TRUE/FALSE macros in arabic, mbyte and spell. #645 2014-07-08 17:34:08 +00:00
Klemen Košir
ef34a0ab13 Replace int with bool in some files. #654 2014-07-08 17:25:48 +00:00
Felipe Oliveira Carvalho
5ed74cfb7c Introduce ga_append_via_ptr() and GA_APPEND_VIA_PTR()
Similar to GA_APPEND(). Replaces this pattern:

    ga_grow(&ga, 1);
    item_type *p = ((item_type *)ga.ga_data) + ga.ga_len;
    p->field1 = v1;
    p->field2 = v2;
    ga.ga_len++;
2014-06-30 03:57:50 -04:00
Felipe Oliveira Carvalho
45e7814e6a Introduce GA_APPEND()
This macro is used to append an element to a growable array. It replaces this
common idiom:

   ga_grow(&ga, 1);
   ((item_type *)ga.ga_data)[ga.ga_len] = item;
   ++ga.ga_len;
2014-06-30 03:57:50 -04:00
Nicolas Hillegeer
8c51804d52 libcall: remove libcall ifdefs
Remove all the legacy code that related to mch_libcall in some way.
os_libcall is implemented on top of libuv now.
2014-06-28 14:44:17 -04:00
Nicolas Hillegeer
99163c9f13 os: implement VimL libcall with {mch,os}_libcall
The old mch_libcall was removed from neovim. This is a partial
reimplementation on top of libuv. It doesn't catch exceptions (windows) nor
signals (unix) though, so it's quite a bit more prone to crashing if the
loadable library throws an exception or crashes. Still, it should be fine
for well-behaved libraries. Requested by @Shougo.
2014-06-28 14:42:59 -04:00
Thiago de Arruda
bc0380038e channel/msgpack_rpc: Refactor to better split functions across modules
Move validation/conversion functions and to msgpack_rpc_helpers to separate
those from the functions that are used from the channel module
2014-06-24 13:02:24 -03:00
Thiago de Arruda
ea7a389ec7 channel: Implement the 'channel_send_call' function
This function is used to send RPC calls to clients. In contrast to
`channel_send_event`, this function will block until the client sends a
response(But it will continue processing requests from that client).

The RPC call stack has a maximum depth of 20.
2014-06-24 13:02:24 -03:00
Thiago de Arruda
0dea2682dc job: Add a maxmem parameter to job_start
The value is forwarded to it's own WStream instance
2014-06-24 13:02:24 -03:00
Thiago de Arruda
0fd46ae8f0 job: Fix vimscript wrapper by returning when an invalid id is passed 2014-06-24 13:02:23 -03:00
oni-link
937c78fe2e vim-patch:7.4.298 #815
Problem:    Can't have a funcref start with "t:".
Solution:   Add "t" to the list of accepted names. (Yukihiro Nakadaira)

https://code.google.com/p/vim/source/detail?r=156f891d520e93eab5d3ce02784660fb13a3b0d3
2014-06-20 02:28:51 -04:00
Will Stamper
3141c02c02 coverity/68215: removed failed variable + dead code from f_readfile #860 2014-06-18 23:57:05 -04:00
Nikolay Orlyuk
ec72b7adc7 spatch to drop check after alloc/lalloc/xmalloc #690 2014-06-18 19:21:01 -04:00
Thiago de Arruda
20fda27cda api: Change type of event data to Object from typval_T 2014-06-18 11:36:07 -03:00
Thiago de Arruda
abc423983d job: Refactor job_write to receive WBuffer instances.
This was done to give more control over memory management to job_write callers.
2014-06-18 11:36:07 -03:00
Thiago de Arruda
287967a2c0 job: Add defer flag and setter method
This is has the same effect as the RStream 'defer' flag, but also works for the
job's exit event.
2014-06-18 11:36:07 -03:00
Thiago de Arruda
71d9899f3c job: Refactor to use pointers instead of ids
'job_start' returns the id as an out paramter, and the 'job_find' function is
now used by eval.c to translate job ids into pointers.
2014-06-18 11:36:07 -03:00
Felipe Oliveira Carvalho
e85598e5a9 Remove unnecessary comments and unnecessary return 2014-06-16 01:40:29 -03:00
Felipe Oliveira Carvalho
238fa72884 No OOM for list_alloc() 2014-06-16 01:40:28 -03:00
Felipe Oliveira Carvalho
3cb3c20b74 Fix some "out of memory" comments and few cosmetics 2014-06-16 01:40:28 -03:00
Felipe Oliveira Carvalho
85100bb01d No OOM in concat_str() (few remaining cases)
Also fixed the duplicated declaration (path.c and strings.c)
2014-06-16 01:40:27 -03:00
Felipe Oliveira Carvalho
3a9a76c996 No OOM in vim_strsave_escape_csi() 2014-06-16 01:36:32 -03:00
Felipe Oliveira Carvalho
a26a1697c7 No OOM in home_replace_save() 2014-06-16 01:36:32 -03:00
Felipe Oliveira Carvalho
8234f2839f No OOM in vim_strsave_escaped[_ext]() 2014-06-16 01:36:31 -03:00
Felipe Oliveira Carvalho
9e7d06da41 No OOM in autoload_name() 2014-06-16 01:31:36 -03:00
Felipe Oliveira Carvalho
129db629dd No OOM in list_insert_tv() and list_extend() 2014-06-16 01:31:35 -03:00
Felipe Oliveira Carvalho
dd57e64794 No OOM in listitem_alloc() 2014-06-16 01:31:35 -03:00
Felipe Oliveira Carvalho
2d092cc229 No OOM in dictitem_copy 2014-06-16 01:31:35 -03:00
Felipe Oliveira Carvalho
48fc1602be No OOM in hash_may_resize() and hash_add_item()
hash_add() can still return FAIL if the key already exists.
2014-06-16 01:31:35 -03:00
Felipe Oliveira Carvalho
6f29364632 No OOM in dictitem_alloc() 2014-06-16 01:31:34 -03:00
Felipe Oliveira Carvalho
c3f88060db No OOM in dict_alloc() and rettv_dict_alloc() 2014-06-16 01:31:34 -03:00
Douglas Schneider
1e1750fdce Replace vim_strncpy calls: eval.c 2014-06-13 18:08:22 -04:00
Brandon Coleman
7f21665673 move/remove W_* macros
move W_ENDCOL to screen.c
remove the rest of the W_* macros
2014-06-12 01:20:36 -05:00
Felipe Oliveira Carvalho
f39fd5b4c4 Declare garray iterators in the for() scope where possible #819 2014-06-10 14:15:21 -04:00
Nicolas Hillegeer
46e4bc0481 text: remove useless arg from mb_string2cells
mb_string2cells was always called like mb_string2cells(..., -1) so that was
the only codepath that was tested. @tarruda was the first to try to input an
actual length, after which valgrind detected that funny business was going
on.

It's not even possible to do the right thing with the current text codec
infrastructure: they all assume to be working with C strings. Meaning that
if there is no NUL-terminator, they will happily keep on reading past the
end of Pascal strings. Ergo, passing the length parameter is moot. The
condition in the for-loop was wrong as well (but that's no longer relevant).

Also change the return value to size_t, by analogy with strlen.

ref:
677d30d796
2014-06-08 12:48:22 -04:00
Justin M. Keyes
01ca4600ba Remove USE_CR and tag_fgets. #808
These features are only used by legacy Mac OS.
2014-06-06 18:04:37 -04:00
oni-link
82d11c0772 vim-patch:7.4.286 #750
Problem:    Error messages are inconsistant. (ZyX)
Solution:   Change "Lists" to "list".

https://code.google.com/p/vim/source/detail?r=be19015ef43cc17825929206790696c2e716035d
2014-06-05 18:32:00 -04:00
ZyX
dca28e55c7 Fix some styles 2014-06-02 11:04:18 -03:00
ZyX
70929f7e16 Add automatic generation of headers
- The 'stripdecls.py' script replaces declarations in all headers by includes to
  generated headers.
  `ag '#\s*if(?!ndef NEOVIM_).*((?!#\s*endif).*\n)*#ifdef INCLUDE_GENERATED'`
  was used for this.
- Add and integrate gendeclarations.lua into the build system to generate the
  required includes.
- Add -Wno-unused-function
- Made a bunch of old-style definitions ANSI

This adds a requirement: all type and structure definitions must be present
before INCLUDE_GENERATED_DECLARATIONS-protected include.

Warning: mch_expandpath (path.h.generated.h) was moved manually. So far it is
the only exception.
2014-06-02 11:04:17 -03:00
Hinidu
b4ca3abc9f Remove FEAT_FLOAT
Support for floating point variables
2014-05-28 13:08:55 -04:00
Hinidu
cfea68db8e Remove FEAT_COMPL_FUNC
Insert mode completion with 'completefunc'
2014-05-28 13:08:54 -04:00
Hinidu
7c188b5498 Remove FEAT_CMDL_COMPL
Completion of mappings/abbreviations in command line mode
2014-05-28 13:08:54 -04:00