aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_docmd.c
Commit message (Collapse)AuthorAge
...
| * Use vim_strchr(s, c) when c may be NUL (#6656)James McCoy2017-05-03
| | | | | | | | | | | | | | | | | | | | | | As part of the refactoring in #5119, some vim_strchr() were changed to strchr(). However, vim_strchr() behaves differently than strchr() when c is NUL, returning NULL instead of a pointer to the NUL. Revert the strchr() calls where it isn't known whether c is NUL, since this causes a semantic change the surrounding code doesn't expect. In the case of #6650, this led to a heap overrun. Closes #6650
| * lintJames McCoy2017-04-29
| |
| * vim-patch:8.0.0150James McCoy2017-04-29
| | | | | | | | | | | | | | | | Problem: When the pattern of :filter does not have a separator then completion of the command fails. Solution: Skip over the pattern. (Ozaki Kiichi, clodes vim/vim#1299) https://github.com/vim/vim/commit/7069bf18e1b1b7bc7640335e07d1022b5acc9048
| * vim-patch:7.4.2263James McCoy2017-04-29
| | | | | | | | | | | | | | | | | | Problem: :filter does not work for many commands. Can only get matching messages. Solution: Make :filter work for :command, :map, :list, :number and :print. Make ":filter!" show non-matching lines. https://github.com/vim/vim/commit/d29459baa61819e59961804ed258efac5733ec70
| * vim-patch:7.4.2244James McCoy2017-04-29
| | | | | | | | | | | | | | | | Problem: Adding pattern to ":oldfiles" is not a generic solution. Solution: Add the ":filter /pat/ cmd" command modifier. Only works for some commands right now. https://github.com/vim/vim/commit/7b668e83d0635d082b7ec90d7d2aa30a9d7d8928
| * *: Add comment to all C filesZyX2017-04-19
| |
| * *: Fix linter errorsZyX2017-04-16
| |
| * ex_docmd: Remove unneeded if()ZyX2017-04-16
| |
| * ex_docmd: Remove :Ni! easter eggZyX2017-04-16
| |
| * ex_docmd: Remove excessive assignmentZyX2017-04-16
| |
* | lua: Move files from src/nvim/viml/executor to src/nvim/luaZyX2017-04-11
| |
* | Merge branch 'master' into luaviml'/luaZyX2017-04-08
|\|
| * *: Use const char * in set_one_cmd_contextZyX2017-03-29
| | | | | | Also renames functions added in master and renamed here.
| * unittests: Add tests for tv_list_find*() functionsZyX2017-03-29
| | | | | | | | | | | | | | | | Additional modifications: - More `const` qualifiers in tested functions. - `tv_list_find_str()` second argument is more in-line with other `tv_list_find*()` functions.
| * eval: Move remaining get_tv_string* functions to eval/typval.cZyX2017-03-29
| |
| * eval: Move get_tv_string_buf() to eval/typval.cZyX2017-03-29
| |
| * eval,*: Move get_tv_string to typval.cZyX2017-03-29
| | | | | | | | Function was renamed and changed to return `const char *`.
| * *: Move some dictionary functions to typval.h and use char*ZyX2017-03-29
| | | | | | | | Also fixes buffer reusage in setmatches() and complete().
| * eval: Split eval.c into smaller filesZyX2017-03-29
| |
| * ci: Check that `#include "*.h"` works as a single includeEiichi NISHINA2017-03-27
| | | | | | | | | | | | | | | | | | | | | | Lesser form of include-what-you-use: at least guarantees that header file did not forget to include something through some other included file. Activate run_single_includes_tests on CI. Fix some IWYU violations. References #5321
* | executor: Add :lua debug.debug mockZyX2017-03-27
| |
* | ex_getln: Refactor script_get()ZyX2017-03-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Use `char *` for strings. 2. Add `const` qualifiers. 3. Add attributes and documentation. 4. Handle skipping *inside*. 5. Handle non-heredoc argument also inside: deferring this to the caller is pointless because all callers need the same thing. Though new ex_lua caller may live without allocations in this case, allocating nevertheless produces cleaner code. 6. Note that all callers call script_get with `eap` and `eap->arg`. Thus second argument is useless in practice: it is one and the same always and can be reached through the first argument.
* | executor: Add :lua commandZyX2017-03-27
|/ | | Does not work currently.
* XXX: ex_tabonly(): aucmd_win is not part of the window list.Justin M. Keyes2017-03-23
| | | | | | | | | | | | | | | | | | | | | | | | | | During free_all_mem, somehow ex_tabonly() may free aucmd_win. But it isn't fully destroyed (maybe autocmd_busy?). When win_free_all() tries to free aucmd_win directly, it double-frees the sub-fields. Tried unnsuccessfully to work around this by invoking `:tabonly!` with autocmds disabled: diff --git a/src/nvim/memory.c b/src/nvim/memory.c index 58c01fbe7a12..91c845e94d22 100644 --- a/src/nvim/memory.c +++ b/src/nvim/memory.c @@ -565,9 +565,9 @@ void free_all_mem(void) /* Close all tabs and windows. Reset 'equalalways' to avoid redraws. */ p_ea = false; if (first_tabpage->tp_next != NULL) - do_cmdline_cmd("tabonly!"); + do_cmdline_cmd("noautocmd tabonly!"); if (firstwin != lastwin) - do_cmdline_cmd("only!"); + do_cmdline_cmd("noautocmd only!"); /* Free all spell info. */ spell_free_all();
* ex_tabnext: Disallow "+NN" arg.Justin M. Keyes2017-03-22
| | | | | Need to do this explicitly because our implementation of getdigits() is slightly different.
* get_tabpage_arg: satisfy clang warningJustin M. Keyes2017-03-22
| | | | vim-patch:8.0.0266
* lintJustin M. Keyes2017-03-22
|
* vim-patch:8.0.0259Justin M. Keyes2017-03-22
| | | | | | | Problem: Tab commands do not handle count correctly. (Ken Hamada) Solution: Add ADDR_TABS_RELATIVE. (Hirohito Higashi) https://github.com/vim/vim/commit/2f72c70657129c16e6b0e413752a775c804f02f8
* lintJustin M. Keyes2017-03-22
|
* vim-patch:7.4.2324Justin M. Keyes2017-03-22
| | | | | | | | | | Problem: Crash when editing a new buffer and BufUnload autocommand wipes out the new buffer. (Norio Takagi) Solution: Don't allow wiping out this buffer. (partly by Hirohito Higashi) Move old style test13 into test_autocmd. Avoid ml_get error when editing a file. https://github.com/vim/vim/commit/e0ab94e7123ca7855f45919114d948ef2bc1e8c3
* vim-patch:7.4.2362raichoo2017-03-19
| | | | | | | | Problem: Illegal memory access with ":1@". (Dominique Pelle) Solution: Correct cursor column after setting the line number. Also avoid calling end_visual_mode() when not in Visual mode. https://github.com/vim/vim/commit/4930a76a0357f76a829eafe4985d04cf3ce0e9e0
* terminal: Support extra arguments in 'shell'. #4504Jack Bracewell2017-03-17
| | | | | | | | | | | | | Tokenize p_sh if used as default in ex_terminal(). Previously p_sh was used as the first arg in a list when calling termopen(), this would try to call an untokenized version of shell, meaning if you had an argument in 'shell': set shell=/bin/bash\ --login the command would fail. Helped-by: oni-link <knil.ino@gmail.com> Closes #3999
* Merge #6252 from jamessan/vim-7.4.2069Justin M. Keyes2017-03-15
|\ | | | | vim-patch:7.4.2069,7.4.2101,7.4.2222,7.4.2223
| * lintJames McCoy2017-03-11
| |
| * vim-patch:7.4.2101James McCoy2017-03-11
| | | | | | | | | | | | | | Problem: Looping over windows, buffers and tab pages is inconsistant. Solution: Use FOR_ALL_ macros everywhere. (Yegappan Lakshmanan) https://github.com/vim/vim/commit/2932359000b2f918d5fade79ea4d124d5943cd07
| * vim-patch:7.4.2069James McCoy2017-03-11
| | | | | | | | | | | | | | Problem: spell.c is too big. Solution: Split it in spell file handling and spell checking. https://github.com/vim/vim/commit/9ccfebddc3ff2a3c2853cf706fd4c26f639bf381
* | DirChanged: avoid redundant events on 'autochdir'Justin M. Keyes2017-03-12
| |
* | DirChanged: trigger when switching scopesJustin M. Keyes2017-03-12
| | | | | | | | Closes #6054
* | DirChanged: Publish _after_ updating win/tab CWD.Justin M. Keyes2017-03-12
| | | | | | | | | | | | So getcwd() works correctly during DirChanged event. Closes #6260
* | tabpage_S: Name tp_localdir per convention.Justin M. Keyes2017-03-12
|/
* vim-patch:8.0.0388Matthew Malcomson2017-03-02
| | | | | | | | | | | | | | | | Fix a problem when filtering manually folded lines When foldMarkAdjustRecurse() is called to adjust folds that start inside the range of lines that are being moved and end outside that range, it calculates `amount_after` for its recursive call incorrectly. The calculation assumes that folds inside the changed range are being deleted, but this is not always the case. This means nested folds that start after the changed range of lines are shifted an incorrect amount. We fix this by calculating the `amount_after` differently if the folds inside the changed range are not being deleted.
* vim-patch:8.0.0135Justin M. Keyes2017-03-02
| | | | | | | | Problem: An address relative to the current line, ":.,+3y", does not work properly on a closed fold. (Efraim Yawitz) Solution: Correct for including the closed fold. (Christian Brabandt) https://github.com/vim/vim/commit/ded2782783f352201ac0b05c6dbe4831adb4a58b
* Merge #6114 'Partial string handling refactoring'.Justin M. Keyes2017-02-17
|\
| * *: Fix linter errorsZyX2017-02-15
| |
| * *: Partial string handling refactoringZyX2017-02-15
| | | | | | | | | | | | | | | | Main points: - Replace `char_u` with `char` in some cases. - Remove `str[len] = NUL` hack in some cases when `str` may be considered `const`.
* | ex_docmd.c: Allow unescaped spaces in :edit filename (#6119)Kurt Bonatz2017-02-15
|/ | | | | | This makes :edit consistent on all platforms. Also affects :argedit, et al. Wild (tab) completion doesn't work, though. Closes #6010
* vim-patch:7.4.2024Marco Hinz2017-02-04
| | | | | | | | | | Problem: More buf_valid() calls can be optimized. Solution: Use bufref_valid() instead. NOTE: Some changes related to channels and the Python and Netbeans interfaces were obviously left out. https://github.com/vim/vim/commit/7c0a2f367f2507669560b1a66423155c70d2e75b
* refactor: Remove strncpy/STRNCPY. (#6008)Justin M. Keyes2017-01-26
| | | | | | | | | | | | | | | Closes #731 References #851 Note: This does not remove some intentional legacy usages of strncpy. - memcpy isn't equivalent because it doesn't check the string length of `src`, and doesn't zero-out the remainder of `dst`. - xstrlcpy isn't equivalent because it doesn't zero-out the remainder of `dst`. Some Vim logic depends on that (e.g. ex_append which calls vim_strnsave). Helped-by: Douglas Schneider <ds3@ualberta.ca> Helped-by: oni-link <knil.ino@gmail.com> Helped-by: James McCoy <jamessan@jamessan.com>
* Move apply_autocmd_dirchanged() to vim_chdir()Marco Hinz2017-01-13
|
* Trigger DirChanged on 'autochdir'Marco Hinz2017-01-13
|