aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval.c
Commit message (Collapse)AuthorAge
...
* Merge pull request #1107 from fmoralesc/matchaddposJustin M. Keyes2014-09-05
|\ | | | | Add matchaddpos()-related vim patches. [vim-patch: 7.4.330, 7.4.334, 7.4.343, 7.4.344, 7.4.362]
| * vim-patch: 7.4.330Felipe Morales2014-09-04
| | | | | | | | | | | | | | | | | | | | 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
* | fileinfo: change returntype of os_fileinfo_sizeStefan Hoffmann2014-08-31
| | | | | | | | off_t -> uint64_t
* | fileinfo: rename os_get_file_info{,_link,_fd}Stefan Hoffmann2014-08-31
| |
* | fileinfo: implement os_fileinfo_sizeStefan Hoffmann2014-08-31
| | | | | | | | this replaces os_get_file_size and file_info.stat.st_size
* | msgpack-rpc: Always use arrays when sending events or callsThiago de Arruda2014-08-29
|/ | | | | | This is required by the msgpack-RPC specification. Also, the send_call/send_event functions were refactored to accept a variable number of arguments
* Merge pull request #1024 from war1025/dev/for_all_buffersJustin M. Keyes2014-08-19
|\ | | | | Add FOR_ALL_BUFFERS helper
| * FOR_ALL_BUFFERS use locally declared buffer pointerWayne Rowcliffe2014-08-17
| |
| * Add FOR_ALL_BUFFERS helperWayne Rowcliffe2014-08-02
| |
* | Merge pull request #1019 from splinterofchaos/globpathJustin M. Keyes2014-08-18
|\ \ | | | | | | vim-patch:7.4.279
| * | vim-patch:7.4.279Scott Prager2014-08-04
| |/ | | | | | | | | | | | | | | Problem: globpath() returns a string, making it difficult to get a list of matches. (Greg Novack) Solution: Add an optional argument like with glob(). (Adnan Zafar) https://code.google.com/p/vim/source/detail?r=8e9db1f27a0063df023cc05a760fce73255dad24
* | vim-patch:7.4.327 #1010André Twupack2014-08-13
| | | | | | | | | | | | | | Problem: When 'verbose' is set to display the return value of a function, may get E724 repeatedly. Solution: Do not give an error for verbose messages. Abort conversion to string after an error. https://code.google.com/p/vim/source/detail?r=99d8f2d72dcd4b850de81998cc9b1120c8165762
* | vim-patch:7.4.323 #967André Twupack2014-08-07
| | | | | | | | | | | | | | Problem: Substitute() with zero width pattern breaks multi-byte character. Solution: Take multi-byte character size into account. (Yukihiro Nakadaira) https://code.google.com/p/vim/source/detail?r=238f5027830cad22e17a970483af9b160869cdf3
* | Refactor vim_feedkeys and f_feedkeysRui Abreu Ferreira2014-08-07
| | | | | | | | | | | | | | | | - To clean up the mix between feedkeys and replace_termcodes the vim_feedkeys API function now does the same thing as the vimscript feedkeys() function - The original f_feedkeys() function now calls the vim_feedkeys() function from the API
* | Remove FEAT_TAG_ANYWHITEPavel Platto2014-08-02
|/ | | | | | This feature allow to use any white space characters instead of one <TAB> in tag files. It is disabled in vanilla Vim's default build configuration. Exuberant ctags use format with exactly one TAB.
* eval: re-add has('mac') and has('macunix') #976Nicolas Hillegeer2014-07-30
| | | | | They were removed but they can be handy to separate some things to do at startup in a .vimrc for example.
* eval: re-remove USE_CR #1002Nicolas Hillegeer2014-07-30
| | | | | It was already removed in 01ca460 and I erroneously introduced it again in PR #978.
* Remove FEAT_MOUSE_JSBFredrik Fornwall2014-07-29
| | | | This is never built and references some obscure jsb terminal
* Remove unused arg 'defer' in 'job_start' #1000oni-link2014-07-29
| | | | | | | | | * With the changes in commit "events: Refactor how event deferral is handled" (2e4ea29d2c7b62eb8baf1c41cd43433e085dda0) the function argument 'defer' of 'job_start' and member variable 'defer' of 'struct job' can be removed. * Update/Fix the documentation for function 'job_start'.
* eval: reimplement f_system() on top of os_system()Nicolas Hillegeer2014-07-27
| | | | | | This evades the tempfile problem (unless of course one manually adds redirects to the shell commandline, which some plugins seem to do, e.g.: vim-easytags).
* viml: re-add sha256() functionNicolas Hillegeer2014-07-21
| | | | Was removed in #699 but actually doesn't have anything to do with security.
* startuptime: always enable startuptimeNicolas Hillegeer2014-07-20
| | | | Removes the STARTUPTIME define.
* provider: Add support for python commands/functionsThiago de Arruda2014-07-17
| | | | | | | | This uses the provider/scripting infrastructure to reintroduce python support through the msgpack-rpc API. A new 'initpython' option was added, and it must be set to a command that will bootstrap the python provider the first time it's needed.
* provider: Add support functions for calling external interpretersThiago de Arruda2014-07-17
| | | | | | This uses the provider module infrastructure to implement common code for vimscript commands/functions that need to communicate with external interpreters, eg: pydo, rubydo, pyfile, rubyfile, etc.
* provider: New module used to expose extension points for core servicesThiago de Arruda2014-07-17
| | | | | | | | | | | | | | | | | Introducing the concept of providers: co-processes that talk with the editor through the remote API and provide implementation for one or more core services. The `provider_register` function and it's API wrapper can be used by channels that want to self-register as a service provider. Some old builtin vim features will be re-implemented as providers. The `provider_has_feature` function is used to check if a provider implementing a certain feature is available(It will be called by the `has` vimscript function to check for features in a vim-compatible way) This implements the provider module without exposing any extension points, which will be done in future commits.
* job: No longer free the job data. It's now done by the exit callbackThiago de Arruda2014-07-17
|
* wstream: Pass WBuffer refcount as a constructor parameterThiago de Arruda2014-07-17
| | | | | | This is required to handle broadcasting when the first write fails. Ref: https://github.com/tarruda/neovim/commit/11916b6b595421ce2ece10f7aa40757cc4937c0c#commitcomment-6792287
* profiling: implement on top of os_hrtime()Nicolas Hillegeer2014-07-16
| | | | | | | | | | | | | | | | | | | | | | | | | | Should be better than gettimeofday() since libuv uses higher resolution clocks on most UNIX platforms. Libuv also tries to use monotonic clocks, kernel bugs notwithstanding, which is another win over gettimeofday(). Necessary for Windows, which doesn't have gettimeofday(). In vanilla vim, Windows uses QueryPerformanceCounter, which is the correct primitive for this sort of things, but that was removed when slimming up the codebase. Libuv uses QueryPerformanceCounter to implement uv_hrtime() on Windows so the behaviour of vim profiling on Windows should now be the same. The behaviour on Linux should be different (better) though, libuv uses more accurate primitives than gettimeofday(). Other misc. changes: - Added function attributes where relevant (const, pure, ...) - Convert functions to receive scalars: Now that proftime_T is always a (uint64_t) scalar (and not a struct), it's clearer to convert the functions to receive it as such instead of a pointer to a scalar. - Extract profiling funcs to profile.c: make everything clearer and reduces the size of the "catch-all" ex_cmds2.c - Add profile.{c,h} to clint and -Wconv: - Don't use sprintf, use snprintf - Don't use long, use int16_t/int32_t/...
* Extract `tempfile` module from fileioPavel Platto2014-07-14
| | | | | | | Though this module is relatively small it has very clear boundaries. The last argument for extracting `tempfile` was the errors which I got when I was writing unittests for it: `cimport './src/nvim/fileio.h'` does not work for some reason.
* Refactor vim_tempnamePavel Platto2014-07-14
| | | | | | | | | - temp_count is uint32_t now instead of long because it supposed to be at most 999999999 (comment on line 5227) temporary files. The most probably it was a long for compatibility with systems where int is 16-bit. - Use "nvim" as prefix for temp folder name instead of "v" - Remove unused parameter from vim_tempname
* Use strict function prototypes #945Pavel Platto2014-07-14
| | | | | | | | | | | | | | | | | | | `-Wstrict-prototypes` warn if a function is declared or defined without specifying the argument types. This warning disallow function prototypes with empty parameter list. In C, a function declared with an empty parameter list accepts an arbitrary number of arguments when being called. This is for historic reasons; originally, C functions didn't have prototypes, as C evolved from B, a typeless language. When prototypes were added, the original typeless declarations were left in the language for backwards compatibility. Instead we should provide `void` in argument list to state that function doesn't have arguments. Also this warning disallow declaring type of the parameters after the parentheses because Neovim header generator produce no declarations for old-stlyle prototypes: it expects to find `{` after prototype.
* os_open: impl mch_open with libuv. ref #133Justin M. Keyes2014-07-14
| | | | | | | | | - use return value instead of open_req.result - libuv uv_fs_open() returns `-errno` instead of always -1 - libuv always sets open_req.result to the return value, _except_ for OOM where it only sets the return value. So always use the return value. - replace calls to mch_open macro. - update call sites expecting -1 error
* move defines from vim.hBrandon Coleman2014-07-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | buffer.h: buflist_getfile() flags buflist_new() flags buf_freeall() flags do_buffer() flags charset.h: chartab[] flags edit.h: in_cinkeys() flags change_indent() flags beginline() flags insertchar() flags nv_mousescroll() flags eval.c AUTOLOAD_CHAR eval.h: enum for vimvars[] ex_cmds.h: do_ecmd read_viminfo flags ex_cmds2.h: check_changed() flags do_source() flags ex_cmds_defs.h: BAD_* flags ex_docmd.h: VALID_PATH VALID_HEAD EXMODE_* do_cmdline() flags added include ex_getln.c *_ESC_CHARS definitions ex_getln.h: history table flags - used by add_to_history() fileio.h: readfile() flags event_T definition getchar.h: ins_typebuf() flags KEYLEN_* globals.h: NO_SCREEN NO_BUFFERS SEA_* defines current_SID flags hlf_T enum HL_FLAGS do_profiling() flags schar_T sattr_T indent.h: set_indent() flags macros.h: BINARY_FILE_IO flags mbyte.h: MB_BYTE2LEN* ENC_* memfile.h: mf_sync() flags misc1.h: open_line() flags message.h: do_dialog() flags vim_dialogyesno() flags DLG_BUTTON_* normal.h: find_ident_under_cursor() flags ops.h: do_put() flags operator ID's option.h: buf_copy_options() flags OPT_* flags os_unix.h: mch_nodetype() flags quickfix.h: skip_vimgrep_pat() flags regexp.h: vim_regcomp() flags values for reg_do_extmatch search.h: do_search() flags search_regcomp() flags findmatchlimit() flags syntax.h: HL_* flags HL_FOLD is used in buffer_defs.h but nvim compiles just fine with the defines in syntax.h tag.h: do_tag() flags find_tags() flags term.h: TBUFSZ flags MOUSE flags ui.h: jump_to_mouse() flags window.h: file_name_in_line() flags win_split() flags MIN_LINES MIN_COLUMNS Remove VimClipboard which should have been removed with PR #921.
* vim-patch:7.4.306 #842Will Stamper2014-07-11
| | | | | | | | 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
* c99: remove vim_round #909Nicolas Hillegeer2014-07-11
| | | | | C89 did not have round(), vim emulated it with vim_round. But since we're using C99 this is not a problem anymore.
* move errno.h include out of vim.hBrandon Coleman2014-07-09
|
* move stdarg.h include out of vim.hBrandon Coleman2014-07-09
|
* move <inttypes.h> include out of vim.hBrandon Coleman2014-07-09
|
* move locale.h include out of vim.hBrandon Coleman2014-07-09
|
* move ascii.h include out of vim.hBrandon Coleman2014-07-09
|
* remove stdbool.h include from vim.h and globals.hBrandon Coleman2014-07-09
|
* Replaced most TRUE/FALSE macros in arabic, mbyte and spell. #645Klemen Košir2014-07-08
|
* Replace int with bool in some files. #654Klemen Košir2014-07-08
|
* Introduce ga_append_via_ptr() and GA_APPEND_VIA_PTR()Felipe Oliveira Carvalho2014-06-30
| | | | | | | | | | 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++;
* Introduce GA_APPEND()Felipe Oliveira Carvalho2014-06-30
| | | | | | | | | 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;
* libcall: remove libcall ifdefsNicolas Hillegeer2014-06-28
| | | | | Remove all the legacy code that related to mch_libcall in some way. os_libcall is implemented on top of libuv now.
* os: implement VimL libcall with {mch,os}_libcallNicolas Hillegeer2014-06-28
| | | | | | | | 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.
* channel/msgpack_rpc: Refactor to better split functions across modulesThiago de Arruda2014-06-24
| | | | | Move validation/conversion functions and to msgpack_rpc_helpers to separate those from the functions that are used from the channel module
* channel: Implement the 'channel_send_call' functionThiago de Arruda2014-06-24
| | | | | | | | 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.
* job: Add a `maxmem` parameter to job_startThiago de Arruda2014-06-24
| | | | The value is forwarded to it's own WStream instance