aboutsummaryrefslogtreecommitdiff
path: root/src/eval.c
Commit message (Collapse)AuthorAge
* Introduce nvim namespace: Move files.Eliseo Martínez2014-05-15
| | | | | | Move files from src/ to src/nvim/. - src/nvim/ becomes the new root dir for nvim executable sources. - src/libnvim/ is planned to become root dir of the neovim library.
* API: Implement vim_evalThiago de Arruda2014-05-12
| | | | | | The vimscript object conversion function was adapted from the version found in 'if_py_both.h' in the upstream source. It was also required to re-add the `dict_lookup` function that was lost during the initial import.
* Fix jumps depending on unitialized valuesThiago de Arruda2014-05-12
| | | | Reported by valgrind
* replaced some mch_lstat()Stefan Hoffmann2014-05-09
|
* replaced some mch_stat() with os_get_file_info()Stefan Hoffmann2014-05-09
|
* implemented os_file_get_size()Stefan Hoffmann2014-05-09
|
* use os_getperm() in f_getfperm()Stefan Hoffmann2014-05-09
|
* Merge pull request #644 from philix/logJustin M. Keyes2014-05-06
|\ | | | | Macro-based log utility for Neovim
| * Introduce os_localtime_r() and os_get_local_time()Felipe Oliveira Carvalho2014-05-06
| | | | | | | | Replace localtime() with os_localtime_r() in `eval.c` and `undo.c`.
* | replaced `vim_free()` calls with `free()` callsMatthias Beyer2014-05-05
|/
* revert #652Justin M. Keyes2014-05-01
| | | | | | | reverting broad cosmetic/style change because: - increases merge-conflicts - increases overhead of merging upstream Vim patches - reasons for change are ambiguous, so default to no change
* vim-patch:7.4.272Marco Hinz2014-04-30
| | | | | | | | Problem: Using just "$" does not cause an error message. Solution: Check for empty environment variable name. (Christian Brabandt) https://code.google.com/p/vim/source/detail?r=00228400629e28384f7f52556c3c119ba0d0a44d
* Remove NUL macroMarco Hinz2014-04-29
|
* vim-patch:7.4.268Marco Hinz2014-04-29
| | | | | | | | | Problem: Using exists() on a funcref for a script-local function does not work. Solution: Translate <SNR> to the special byte sequence. Add a test. https://code.google.com/p/vim/source/detail?r=1a5ed2626b26a982e307a206572121a557adf709
* Cleanuponi-link2014-04-29
| | | | | | | * Remove unnecessary else * Move variable declaration nearer to point of use * Add missing curly brackets * Comment style
* Call to rettv_list_alloc cannot fail.oni-link2014-04-29
| | | | Clean up the use of rettv_list_alloc and remove error checks.
* Call to list_append_tv cannot fail.oni-link2014-04-29
| | | | Clean up the use of list_append_tv and remove error checks.
* Call to list_append_number cannot fail.oni-link2014-04-29
| | | | Clean up the use of list_append_number and remove error checks.
* Test and refactor `shorten_fname` and `shorten_fname1`John2014-04-29
| | | | | Rename `shorten_fname` -> `path_shorten_fname` Rename `shorten_fname1` -> `path_shorten_fname_if_possible`
* vim-patch:7.4.241oni-link2014-04-28
| | | | | | | | Problem: The string returned by submatch() does not distinguish between a NL from a line break and a NL that stands for a NUL character. Solution: Add a second argument to return a list. (ZyX) https://code.google.com/p/vim/source/detail?r=a63d0cd691dc925283815d17d62f4e948d723a59
* vim-patch:7.4.265Klemen Košir2014-04-28
| | | | | | | Problem: Can't call a global function with "g:" in an expression. Solution: Skip the "g:" when looking up the function. https://code.google.com/p/vim/source/detail?r=8ec9d2196bee0c5108f2d2c196a660a7f4e5f29f
* vim-patch:7.4.264Marco Hinz2014-04-28
| | | | | | | | | Problem: Can't define a function starting with "g:". Can't assign a funcref to a buffer-local variable. Solution: Skip "g:" at the start of a function name. Don't check for colons when assigning to a variable. https://code.google.com/p/vim/source/detail?r=00acac0af680c2d8c82db5258474b121a5908926
* Use portable format specifiers: Clarify some casted expressions.Eliseo Martínez2014-04-28
| | | | | | | | | Though correct (to my understanding), some of the casts introduced in previous commits could lead to confusion, by casting only the first expression component instead of the whole expression. This fixes that, parenthesizing casted expressions, except where operator precedence rules make it unneccesary.
* Call to list_append_string cannot fail.oni-link2014-04-28
| | | | Clean up the use of list_append_string and remove error checks.
* Call to list_append_dict cannot fail.oni-link2014-04-28
| | | | Clean up the use of list_append_dict and remove error checks.
* Remove code and checks for unsupported systems.Chris Watkins2014-04-28
| | | | | Remove remnants of support for systems including __EMX__, MSDOS, OS2, AMIGA and MORPHOS.
* Remove `alloc_clear`John Schmidt2014-04-28
| | | | | Use `xcalloc` instead. Inline `alloc_tv` and `alloc_string_tv` in eval.c
* vim-patch:7.4.260Marco Hinz2014-04-25
| | | | | | | | | | Problem: It is possible to define a function with a colon in the name. It is possible to define a function with a lower case character if a "#" appears after the name. Solution: Disallow using a colon other than with "s:". Ignore "#" after the name. https://code.google.com/p/vim/source/detail?r=6bc874e4789a0f912b4fd6b23afecf19d80b1605
* Add cast to unsigned to improve div by 2 in find_internal_func()Felipe Oliveira Carvalho2014-04-24
|
* Use /2 and 2* instead of >>1 and <<1 which are tricky with signed typesFelipe Oliveira Carvalho2014-04-24
| | | | | | | | | | | | | | | | | Today's compilers generate shift instructions to perform division and multiplications by powers of 2 [1]. `(x >> 1)` looks straightforward enough, but if x is signed the code will fail when x < 0. The compiler knows better: use `x / 2`. That's why we have code like this: (long)((long_u)Rows >> 1)) instead of the cleaner version that generates the same or better machine code: Rows / 2 [1] http://goo.gl/J4WpG7
* No OOM error conditions in some functions of window.cFelipe Oliveira Carvalho2014-04-24
| | | | | | | | | | - alloc_tabpage() - win_alloc_lines() - win_alloc_aucmd_win() - new_frame() - win_alloc() TODO: don't handle OOM after calls to dict_alloc()
* vim-patch:7.4.237oni-link2014-04-24
| | | | | | | | Problem: When some patches was not included has("patch-7.4.123") may return true falsely. Solution: Check for the specific patch number. https://code.google.com/p/vim/source/detail?r=71b165a378ad580818f6d497ecf0f8ad054a9683
* Use portable format specifiers: Case %ld - localized - N_.Eliseo Martínez2014-04-23
| | | | | Fix uses of plain "%ld" within N_(): - Replace "%ld" with "%" PRId64.
* Use portable format specifiers: Case %ld - plain - EMSGN.Eliseo Martínez2014-04-23
| | | | | | Fix uses of plain "%ld" within EMSGN(): - Replace "%ld" with "%" PRId64. - No argument cast needed. EMSGN() will take care of that.
* Use portable format specifiers: Case %ld - localized - smsg.Eliseo Martínez2014-04-23
| | | | | | Fix uses of localized "%ld" within smsg(): - Replace "%ld" with "%" PRId64. - Cast corresponding argument to (int64_t).
* Use portable format specifiers: Case %ld - plain - sprintf.Eliseo Martínez2014-04-23
| | | | | | Fix uses of plain "%ld" within sprintf(): - Replace "%ld" with "%" PRId64. - Cast corresponding argument to (int64_t).
* vim-patch:7.4.236oni-link2014-04-19
| | | | | | | Problem: It's not that easy to check the Vim patch version. Solution: Make has("patch-7.4.123") work. (partly by Marc Weber) https://code.google.com/p/vim/source/detail?r=a44087db72386d080e9da870d751daf498004be8
* Remove unnecessary cleanup label from `job_start`Thiago de Arruda2014-04-18
| | | | The argument vector is now freed in the `close_cb` function in job.c
* Refactor job control to use RStream eventsThiago de Arruda2014-04-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of a single 'job read' callback, job control consumers need to provide callbacks for "stdout read", "stderr read" and "exit". For vimscript, the JobActivity autocommand is still used to handle every job event, for example: ```vim :let srv1_id = jobstart('netcat-server-1', 'nc', ['-l', '9991']) :let srv2_id = jobstart('netcat-server-2', 'nc', ['-l', '9991']) function JobEvent() " v:job_data[0] = the job id " v:job_data[1] = the event type, one of "stdout", "stderr" or "exit" " v:job_data[2] = data read from stdout or stderr if v:job_data[1] == 'stdout' let str = 'Message from job '.v:job_data[0].': '.v:job_data[2] elseif v:job_data[1] == 'stderr' let str = 'Error message from job '.v:job_data[0].': '.v:job_data[2] else " Exit let str = 'Job '.v:job_data[0].' exited' endif call append(line('$'), str) endfunction au JobActivity netcat-server-* call JobEvent() ``` And to see messages from 'job 1', run in another terminal: ```sh bash -c "while true; do echo 123; sleep 1; done" | nc localhost 9991 ```
* Remove modelinesMarco Hinz2014-04-16
| | | | | Removed modelines are better than modelines that differ from file to file.
* Refactor job control module to use RStream classThiago de Arruda2014-04-16
|
* vim-patch:7.4.234Marco Hinz2014-04-16
| | | | | | | | Problem: Can't get the command that was used to start Vim. Solution: Add v:progpath. (Viktor Kojouharov) https://code.google.com/p/vim/source/detail?r=d2286df8719d6e99c743e3bf6ac14d1f9debc84d
* vim-patch:7.4.229Marco Hinz2014-04-16
| | | | | | | | Problem: Using ":let" for listing variables and the second one is a curly braces expression may fail. Solution: Check for an "=" in a better way. (ZyX) https://code.google.com/p/vim/source/detail?r=839cca5ec18d560e3714065e54ed38b6e812aaf7
* vim-patch:7.4.218Marco Hinz2014-04-16
| | | | | | | | Problem: It's not easy to remove duplicates from a list. Solution: Add the uniq() function. (LCD) https://code.google.com/p/vim/source/detail?r=ddc3f32a4b2191f829206322d46f0e9c7e365e22
* vim-patch:7.4.191oni-link2014-04-14
| | | | | | | | Problem: Escaping a file name for shell commands can't be done without a function. Solution: Add the :S file name modifier. https://code.google.com/p/vim/source/detail?r=40f18a1c1592c8b4047f6f2a413557f48a99c55f
* vim-patch:7.4.192oni-link2014-04-11
| | | | | | | Problem: Memory leak when giving E853. Solution: Free the argument. (Dominique Pelle) https://code.google.com/p/vim/source/detail?r=04c4ef8c0a1b757494500e46400552b135135e94
* removed vim_mkdir macroStefan Hoffmann2014-04-11
|
* removed mch_remove macroStefan Hoffmann2014-04-11
|
* Remove OOM error handling code after ga_grow() callsFelipe Oliveira Carvalho2014-04-11
|
* Move exe functions back to os/fs.cJohn Schmidt2014-04-08
|