Commit Graph

1703 Commits

Author SHA1 Message Date
Thiago de Arruda
38dcfb6062 api/msgpack-rpc: Use EXT type to serialize Buffer/Window/Tabpage 2014-09-12 13:25:28 -03:00
Thiago de Arruda
2f566c83d9 api/msgpack-rpc: Parse type information from api/private/defs.h
Enhance msgpack-gen.lua to extract custom api type codes from the ObjectType
enum in api/private/defs.h. The type information is made available from the api
metadata and clients can use to correctly serialize/deserialize these types
using msgpack EXT type.
2014-09-12 13:25:28 -03:00
Thiago de Arruda
d5a60d17fb api/msgpack-rpc: Remove specialized array types
Specialized array types(BufferArray, WindowArray, etc) were added to the API for
two main reasons:

- msgpack used to lack a way of serializing appliaction-specific types and there
  was no obvious way of making an API function accept/return arrays of custom
  objects such as buffers(which are represented as integers, so clients didn't
  have a way to distinguish from normal numbers)
- Let clients in statically-typed languages that support generics have a better
  typed API

With msgpack 2.0 EXT type the first item is no longer a factor and this commit
starts by removing the specialized array types. The second item will be
addressed in the future by making the API metadata return extra useful
information for statically-typed languages.
2014-09-12 13:25:28 -03:00
Thiago de Arruda
505985b870 msgpack-rpc: Remove the msgpack_rpc_unpack function
The `msgpack_rpc_unpack` function was created to work around a deficiency in the
msgpack unpack API, which did not let the caller know if parsing failed due to
needing more data or to invalid input. The deficiency does not exist in the
latest version of `msgpack_unpacker_next`, so it can safely be removed.
2014-09-12 13:25:28 -03:00
Thiago de Arruda
41a48a3fc7 memory: Use i18n messages for memory-related errors 2014-09-12 13:25:28 -03:00
Thiago de Arruda
d5e3cede28 msgpack-rpc: Remove support for integer ids in methods
There's no need to have integer and string ids, and since we now fully support
msgpack-RPC, support for integer ids was removed.
2014-09-12 13:25:28 -03:00
Thiago de Arruda
cd70b9c015 msgpack-rpc: Refactor API metadata discovery method
A new method is now exposed via msgpack-rpc: "get_api_metadata". This method has
the same job as the old method '0', it returns an object with API metadata for
use by generators.

There's one difference in the return value though: instead of returning a
string containing another serialized msgpack document, the metadata object is
returned directly(a separate deserialization step by clients is not required).
2014-09-12 13:25:28 -03:00
Thiago de Arruda
19bc29ee83 msgpack-rpc: Move handle_missing_method to msgpack_rpc.c
Since that function is not automatically generated, it's best to place it in a
normal C module
2014-09-12 13:25:28 -03:00
Thiago de Arruda
74aff19691 msgpack-rpc: Refactor initializer and dispatcher
Use Map(String, rpc_method_handler_fn) for storing/retrieving rpc method
handlers in msgpack_rpc_init and msgpack_rpc_dispatch.

Also refactor serialization/validation functions in the
msgpack_rpc.c/msgpack_rpc_helpers.c modules to accept the new STR and BIN types.
2014-09-12 13:25:28 -03:00
Thiago de Arruda
c39ae3e4d4 map/msgpack-rpc: Declare/define maps rpc method handlers
The new map type uses `String` instances as keys to avoid unnecessary copying to
zero-terminated buffers.
2014-09-12 13:25:28 -03:00
Thiago de Arruda
e2143674ae deps: Update to the experimental msgpack v5 branch
Using msgpack v5 will let nvim be more compatible with msgpack libraries for
other platforms.

This also replaces "raw" references by "bin" which is the new name for msgpack
binary data type
2014-09-12 13:19:50 -03:00
Justin M. Keyes
042aca6eb4 Merge pull request #1098 from fwalch/update-busted
Update busted to version 2.
2014-09-12 09:54:10 -04:00
Justin M. Keyes
5ca1f97462 Merge pull request #1037 from fwalch/automatic-deps-paths
Travis: Add subdirectories to dependency paths.
2014-09-12 09:54:03 -04:00
Justin M. Keyes
3254372602 Merge pull request #1161 from atwupack/vp-7.4.349
vim-patch:7.4.349
2014-09-11 16:13:03 -04:00
André Twupack
12ca4f582e vim-patch:7.4.349
Problem:    When there are matches to highlight the whole window is redrawn,
            which is slow.
Solution:   Only redraw everything when lines were inserted or deleted.
            Reset b_mod_xlines when needed.  (Alexey Radkov)

https://code.google.com/p/vim/source/detail?r=v7-4-349
2014-09-11 20:46:10 +02:00
Justin M. Keyes
ba4acce341 Merge pull request #1160 from atwupack/vp-7.4.348
vim-patch:7.4.348
2014-09-11 14:32:17 -04:00
André Twupack
f4f9e7eaf3 vim-patch:7.4.348
Problem:    When using "J1" in 'cinoptions' a line below a continuation line gets too much indent.
Solution:   Fix parenthesis in condition.

https://code.google.com/p/vim/source/detail?r=v7-4-348
2014-09-11 20:11:57 +02:00
Florian Walch
0a01b3052e Update busted to 2.0.rc3.
Default to verbose output to show more information in case of errors.
Fix #1031.
2014-09-11 20:03:35 +02:00
Florian Walch
579e0baba0 Travis: Add subdirectories to dependency paths. 2014-09-11 19:54:00 +02:00
John Szakmeister
053a13d2a4 Merge #1033 'Automatic dependency rebuilding: Pass CMAKE_C_COMPILER_ARG1 to deps building.' 2014-09-11 06:13:17 -04:00
Florian Walch
dd27c30687 CMake: Use CMAKE_C_COMPILER_ARG1 when building dependencies.
CMAKE_C_COMPILER_ARG1 is set in CMake toolchain file
cmake/i386-linux-gnu.toolchain.cmake. Use when compiling dependencies to
simplify 32-bit builds.
2014-09-11 06:13:12 -04:00
Justin M. Keyes
1da3398095 Merge pull request #1144 from justinmk/fixtests
fix unittest issues with busted 2.x
2014-09-11 05:06:58 -04:00
Justin M. Keyes
99a9161bac unit tests: initialize everything 2014-09-11 08:58:17 +00:00
Justin M. Keyes
f6088e79b0 unit tests: avoid global scope; add missing cimports
temporarily comment out call to vim_deltempdir() to avoid segfault
2014-09-11 05:17:52 +00:00
Justin M. Keyes
c76feb338a unit tests: helpers.lua: hack to avoid empty popen() result 2014-09-11 05:17:52 +00:00
Justin M. Keyes
7577c31ed0 Merge pull request #1143 from mkwork/readme
README.md: link to libuv
2014-09-10 17:12:13 -04:00
Justin M. Keyes
c54baaa319 Merge pull request #1159 from atwupack/vp-7.4.345
vim-patch:7.4.345
2014-09-10 17:09:04 -04:00
Justin M. Keyes
867bdae5c2 Merge pull request #1158 from atwupack/vp-7.4.337
vim-patch:7.4.337
2014-09-10 17:04:58 -04:00
André Twupack
60371bb1bb vim-patch:7.4.345
Problem:    Indent is not updated when deleting indent.
Solution:   Remember changedtick.

https://code.google.com/p/vim/source/detail?r=v7-4-345
2014-09-10 21:33:51 +02:00
André Twupack
1fb80d24eb vim-patch:7.4.337
Problem:    When there is an error preparing to edit the command line, the
            command won't be executed. (Hirohito Higashi)
Solution:   Reset did_emsg before editing.

https://code.google.com/p/vim/source/detail?r=v7-4-337
2014-09-10 21:17:31 +02:00
Justin M. Keyes
34c418fceb Merge pull request #1154 from Shougo/fix-NAs
Fix #1147 version numbers
2014-09-09 18:46:45 -04:00
Shougo Matsushita
68b9b43607 Fix version numbers 2014-09-10 07:32:56 +09:00
Justin M. Keyes
7738e723e9 Merge pull request #1149 from splinterofchaos/vim-patch-7.4.278
vim-patch:7.4.278
2014-09-09 15:00:06 -04:00
Scott Prager
f85053ccf7 vim-patch:7.4.278
Problem:    list_remove() conflicts with function defined in Sun header file.
Solution:   Rename the function. (Richard Palo)

https://code.google.com/p/vim/source/detail?r=v7-4-278
2014-09-09 12:30:34 -04:00
Justin M. Keyes
9fa467a9b2 Merge pull request #1096 from war1025/dev/local_for_all_windows
Convert FOR_ALL_WINDOWS to use a locally declared pointer
2014-09-08 20:50:44 -04:00
Wayne Rowcliffe
ac0b9714ed Additional FOR_ALL_WINDOWS usage 2014-09-08 17:27:41 -05:00
Wayne Rowcliffe
fe99930c46 Convert FOR_ALL_WINDOWS to use a locally declared pointer 2014-09-08 17:27:41 -05:00
Maxim Kot
213cbdd4e4 README.md: link to libuv
Reference to libuv was made a link
2014-09-07 01:28:54 +04:00
Justin M. Keyes
3f5482d325 Merge pull request #1107 from fmoralesc/matchaddpos
Add matchaddpos()-related vim patches. [vim-patch: 7.4.330, 7.4.334, 7.4.343, 7.4.344, 7.4.362]
2014-09-05 20:57:41 -04:00
Justin M. Keyes
d66cd61b79 Merge pull request #1054 from stefan991/fileinfo-getter
FileInfo getters for `filesize`, `hardlinks` and `blocksize`
2014-09-04 01:22:25 -04:00
Felipe Morales
d860ba45e2 vim-patch: 7.4.344
Problem:    Unnecessary initializations and other things related to
	    matchaddpos().
Solution:   Code cleanup. (Alexey Radkov)

https://code.google.com/p/vim/source/detail?r=ce284c205558d103326a4c3f22f181774690b3eb
2014-09-04 00:18:25 -04:00
Felipe Morales
15d86890d4 vim-patch: 7.4.343
Problem:    matchdelete() does not always update the right lines.
Solution:   Fix off-by-one error.  (Ozaki Kiichi)

https://code.google.com/p/vim/source/detail?r=539ce56d8f35fe2deb5c4f57335e1adf97ae4e74
2014-09-04 00:18:25 -04:00
Felipe Morales
9d7e3336cf vim-patch: 7.4.362
Problem:    When matchaddpos() uses a length smaller than the number of
bytes in the (last) character the highlight continues until the end of
            the line.
Solution:   Change condition from equal to larger-or-equal.

https://code.google.com/p/vim/source/detail?r=7fa2bed947fde3514a700c96861a537d816d6fd4
2014-09-04 00:18:25 -04:00
Felipe Morales
a8124602f0 vim-patch: 7.4.334
Problem:    Unitialized variables, causing some problems.
Solution:   Initialize the variables. (Dominique Pelle)

https://code.google.com/p/vim/source/detail?r=03d260a8ea0c0c67f424c387dbe2af5754e5e589
2014-09-04 00:18:24 -04:00
Felipe Morales
bf3d945798 vim-patch: 7.4.330
Problem:    Using a regexp pattern to highlight a specific position can
be slow.
Solution:   Add matchaddpos() to highlight specific positions
efficiently.
(Alexey Radkov.)

https://code.google.com/p/vim/source/detail?r=f9fa2e506b9f07549cd91074835c5c553db7b3a7
2014-09-04 00:18:24 -04:00
Stefan Hoffmann
7ac191ab10 fileinfo: change returntype of os_fileinfo_size
off_t -> uint64_t
2014-08-31 15:47:44 +02:00
Stefan Hoffmann
10813ce38c fileid: rename os_file_id_equal_file_info 2014-08-31 15:47:43 +02:00
Stefan Hoffmann
3cf7a17a44 fileid: rename os_file_id_equal 2014-08-31 15:47:36 +02:00
Stefan Hoffmann
4e43095ab2 fileid: rename os_get_file_id 2014-08-31 15:43:40 +02:00
Stefan Hoffmann
8a66f4f245 fileinfo: rename os_file_info_get_inode 2014-08-31 15:42:19 +02:00