aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval.c
Commit message (Collapse)AuthorAge
...
* illumos requires the use of limits.h for things like INT_MAX #2049Mike Zeller2015-02-26
|
* job: Allow spawning jobs connected to pseudo terminalsThiago de Arruda2015-02-23
|
* job: Refactor process spawning and startup argumentsThiago de Arruda2015-02-23
| | | | | | | | - process spawning was decoupled from the rest of the job control logic. The goal is reusing it for spawning processes connected to pseudo terminal file descriptors. - job_start now receives a JobOptions structure containing all the startup options.
* eval: Fix buffering of data in job autocommandsThiago de Arruda2015-02-23
| | | | | Job autocommands will no longer buffer data chunks that don't end in newlines characters.
* refactor: Remove term modules and termcap optionsThiago de Arruda2015-02-21
| | | | | | | | | | | | | | | - Removed term.c, term.h and term_defs.h - Tests for T_* values were removed. screen.c was simplified as a consequence(the best strategy for drawing is implemented in the UI layer) - Redraw functions now call ui.c functions directly. Updates are flushed with `ui_flush()` - Removed all termcap options(they now return empty strings for compatibility) - &term/&ttybuiltin options return a constant value(nvim) - &t_Co is still available, but it mirrors t_colors directly - Remove cursor tracking from screen.c and the `screen_start` function. Now the UI is expected to maintain cursor state across any call, and reset it when resized. - Remove unused code
* vim-patch:7.4.525 #1988Fabian Brosda2015-02-19
| | | | | | | Problem: map() leaks memory when there is an error in the expression. Solution: Call clear_tv(). (Christian Brabandt) https://code.google.com/p/vim/source/detail?r=v7-4-525
* Enable -Wconversion: mark.c.Eliseo Martínez2015-02-18
| | | | | | Refactoring summary: - MB_STRNICMP: Inlined. - MB_STRNCMP: Inlined.
* syntax: Refactor to store all term and gui attributes independentlyThiago de Arruda2015-02-16
| | | | | Now the attrentry_T structure will store all attributes in separate fields for cterm and rgb UIs.
* ui: Remove/adapt some old code for a big UI refactorThiago de Arruda2015-02-16
| | | | | | | | | | | | | - Remove abstract_ui global, now it is always active - Remove some terminal handling code - Remove unused functions - Remove HAVE_TGETENT/TERMINFO/TERMIOS/IOCTL #ifdefs - Remove tgetent/terminfo from version.c - Remove curses/terminfo dependencies - Only start/stop termcap when starting/exiting the program - msg_use_printf will return true if there are no attached UIs( messages will be written to stdout) - Remove `ex_winpos`(implement `:winpos` with `ex_ni`)
* Remove nonnullret deadcode: xmalloc.Eliseo Martínez2015-01-27
|
* Remove nonnullret deadcode: vim_strsave.Eliseo Martínez2015-01-27
|
* vim-patch:7.4.446Pavel Platto2015-01-20
| | | | | | | | | Problem: In some situations, when setting up an environment to trigger an autocommand, the environment is not properly restored. Solution: Check the return value of switch_win() and call restore_win() always. (Daniel Hahler) https://code.google.com/p/vim/source/detail?r=v7-4-446
* Remove long_u: ex_docmd.c: Refactor long_u.Eliseo Martínez2015-01-19
|
* Merge pull request #1816 from Pyrohh/macro_cleanupJustin M. Keyes2015-01-15
|\ | | | | Macro cleanup
| * Macro cleanup: PROTOMichael Reed2015-01-14
| | | | | | | | | | | | Regarding dict_lookup() in eval.c: both definitions are the same, the only difference being the spacing between the indirection operator and the indentation level.
* | main: Fix color schemes for abstract_uiThiago de Arruda2015-01-13
|/ | | | | | | | | - Set 't_Co' to 256 at startup. The value can be changed by the user for compatibility with terminals that are less capable. - `has('gui_running')` will return 1 if at least one rgb UI is attached. Even though these changes are hacky, they are necessary to make the transition to the new UI architecture smoother.
* Revert "[WIP] "abstract_ui" fixes and improvements"Justin M. Keyes2015-01-12
|
* Merge pull request #1657 from tarruda/abstract-ui-fixesJustin M. Keyes2015-01-12
|\ | | | | [WIP] "abstract_ui" fixes and improvements
| * ui: Test for abstract_ui whenever a minimal t_colors value is requiredThiago de Arruda2015-01-10
| | | | | | | | | | t_colors should not be checked when abstract_ui is active, because nvim UI is not limited to a terminal.
* | Cleanup: Rename getdigits() family functions.Eliseo Martínez2015-01-11
| |
* | Cleanup: Refactor getdigits().Eliseo Martínez2015-01-11
|/ | | | | | | | | | | | | | | | Problem : getdigits() currently returns a long, but at most places, return value is casted (unsafely) into an int. Making casts safe would introduce a lot of fuss in the form of assertions checking for limits. Note : We cannot just change return type to int, because, at some places, legitimate long values are used. For example, in diff.c, for line numbers. Solution : Introduce new functions: - get_digits() : Gets an intmax_t from a string. - get_int_digits() : Wrapper for ints. - get_long_digits() : Wrapper for longs. And replace getdigits() invocations by the appropiate wrapper invocations.
* Merge pull request #1761 from oni-link/speed.up.gcJustin M. Keyes2015-01-10
|\ | | | | Speed up garbage collection (Issue 1687).
| * Speed up garbage collection.oni-link2014-12-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For garbage collection all lists are kept in first_list, a list of all lists. free_unref_items() searches through first_list and removes unreferenced lists from it (by calling list_free(..., FALSE)). But after a list was removed, the search continues from the beginning of first_list (not sure how many lists were really removed and where to continue in first_list). This is not necessary anymore since vim-patch 7.0.135, because a call to list_free(...,FALSE) makes sure, that no other lists (and dictionaries) are freed. So we always know, that the next list in first_list is still valid (allocated or NULL) and can be used to continue the search. Likewise for dictionaries. Original patch by Ariya Mizutani https://groups.google.com/forum/#!searchin/vim_dev/GC/vim_dev/DBYOdHQWvqY/1WH04_dwETIJ
* | Remove long_u: term: Enable -Wconversion.Eliseo Martínez2015-01-10
| |
* | eval: fix incorrect refcount in list_append_listBjörn Linse2015-01-07
|/
* Merge pull request #1738 from fwalch/vim-7.4.549Justin M. Keyes2014-12-30
|\ | | | | vim-patch:7.4.549
| * vim-patch:7.4.549Florian Walch2014-12-27
| | | | | | | | | | | | | | Problem: Function name not recognized correctly when inside a function. Solution: Don't check for an alpha character. https://code.google.com/p/vim/source/detail?r=v7-4-549
* | vim-patch:7.4.541Florian Walch2014-12-25
|/ | | | | | | Problem: Crash when doing a range assign. Solution: Check for NULL poiter. (Yukihiro Nakadaira) https://code.google.com/p/vim/source/detail?r=v7-4-541
* vim-patch:7.4.516Florian Walch2014-12-24
| | | | | | | | Problem: Completing a function name containing a # does not work. Issue 253. Solution: Recognize the # character. (Christian Brabandt) https://code.google.com/p/vim/source/detail?r=v7-4-516
* vim-patch:7.4.513Florian Walch2014-12-23
| | | | | | | | Problem: Crash because reference count is wrong for list returned by getreg(). Solution: Increment the reference count. (Kimmy Lindvall) https://code.google.com/p/vim/source/detail?r=v7-4-513
* vim-patch:7.4.491Florian Walch2014-12-23
| | | | | | | | Problem: When winrestview() has a negative "topline" value there are display errors. Solution: Correct a negative value to 1. (Hirohito Higashi) https://code.google.com/p/vim/source/detail?r=v7-4-491
* vim-patch:7.4.499Florian Walch2014-12-23
| | | | | | | | Problem: substitute() can be slow with long strings. Solution: Store a pointer to the end, instead of calling strlen() every time. (Ozaki Kiichi) https://code.google.com/p/vim/source/detail?r=v7-4-499
* vim-patch:7.4.311David Rodriguez2014-12-23
| | | | | | | Problem: Can't use winrestview to only restore part of the view. Solution: Handle missing items in the dict. (Christian Brabandt) https://code.google.com/p/vim/source/detail?r=v7-4-311
* Merge pull request #1663 from philix/array_sizeJustin M. Keyes2014-12-19
|\ | | | | Define and use the ARRAY_SIZE macro
| * Define and use the ARRAY_SIZE macroFelipe Oliveira Carvalho2014-12-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A similar macro is defined in the Linux kernel [1]. To refactor the code I used a slightly modified Coccinelle script I found in [2]. ```diff // Use the macro ARRAY_SIZE when possible // // Confidence: High // Copyright: (C) Gilles Muller, Julia Lawall, EMN, DIKU. GPLv2. // URL: http://www.emn.fr/x-info/coccinelle/rules/array.html // Options: -I ... -all_includes can give more complete results @@ type T; T[] E; @@ - (sizeof(E)/sizeof(*E)) + ARRAY_SIZE(E) @@ type T; T[] E; @@ - (sizeof(E)/sizeof(E[...])) + ARRAY_SIZE(E) @@ type T; T[] E; @@ - (sizeof(E)/sizeof(T)) + ARRAY_SIZE(E) @n@ identifier AS,E; @@ - #define AS(E) ARRAY_SIZE(E) @@ expression E; identifier n.AS; @@ - AS(E) + ARRAY_SIZE(E) ``` `spatch --in-place --sp-file array_size.cocci -I src/ -I build/include/ -I build/src/nvim/auto/ src/nvim/*.c` [1] http://lxr.free-electrons.com/source/include/linux/kernel.h#L54 [2] http://www.emn.fr/z-info/coccinelle/rules/#macros
* | vim-patch:7.4.442Florian Walch2014-12-18
| | | | | | | | | | | | | | Problem: Using unitinialized variable. Solution: Pass the first window of the tabpage. https://code.google.com/p/vim/source/detail?r=v7-4-442
* | vim-patch:7.4.434Florian Walch2014-12-18
|/ | | | | | | | Problem: gettabvar() is not consistent with getwinvar() and getbufvar(). Solution: Return a dict with all variables when the varname is empty. (Yasuhiro Matsumoto) https://code.google.com/p/vim/source/detail?r=v7-4-434
* Reduce indentation level by early returning or continuing loopFelipe Oliveira Carvalho2014-12-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace code like this ```c func() { if (cond) { ... ... ... } return ret; } ``` ```c for (...) { if (cond) { ... ... ... } } ``` with ```c func() { if (!cond) { return ret; } ... ... ... } ``` ```c for (...) { if (!cond) { continue; } ... ... ... } ```
* Merge pull request #1134 from splinterofchaos/getreg-nlJustin M. Keyes2014-12-11
|\ | | | | vim-patch:7.4.242 + vim-patch:7.4.243
| * Attribute/constify get_tv_string(_buf(_chk)).Scott Prager2014-12-11
| |
| * vim-patch:7.4.249Scott Prager2014-12-11
| | | | | | | | | | | | | | Problem: Using setreg() with a list of numbers does not work. Solution: Use a separate buffer for numbers. (ZyX) https://code.google.com/p/vim/source/detail?r=v7-4-249
| * vim-patch:7.4.243Scott Prager2014-12-11
| | | | | | | | | | | | | | Problem: Cannot use setreg() to add text that includes a NUL. Solution: Make setreg() accept a list. https://code.google.com/p/vim/source/detail?r=v7-4-243
| * Return void * from get_reg_contents.Scott Prager2014-12-11
| |
| * vim-patch:7.4.242Scott Prager2014-12-11
| | | | | | | | | | | | | | | | Problem: getreg() does not distinguish between a NL used for a line break and a NL used for a NUL character. Solution: Add another argument to return a list. (ZyX) https://code.google.com/p/vim/source/detail?r=v7-4-242
* | Use GA_DEEP_CLEAR where appropriateFelipe Oliveira Carvalho2014-12-11
|/
* eval_has_provider: search autoload scripts same order as call_funcBjörn Linse2014-12-08
|
* clipboard: support separate '+' and '*' clipboardsBjörn Linse2014-12-08
|
* systemlist: add `keepempty` option to preserve final newlineBjörn Linse2014-12-02
|
* eval: Fix coverity false positive.Scott Prager2014-11-27
| | | | | | | | | | ** CID 74786: Resource leak (RESOURCE_LEAK) /src/nvim/eval.c: 10614 in f_jobsend() /src/nvim/eval.c: 10616 in f_jobsend() save_tv_as_string() should return NULL and input_len <= 0 for an empty string or error. Callers should check that input != NULL instead of input_len > 0 and assert(input == NULL) when the length must be checked.
* ui: Remove redundant ui.h includesThiago de Arruda2014-11-27
| | | | Also move read_error_exit to os/input.c