aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
* Merge pull request #4652 from HiPhish/coverity-defectsJustin M. Keyes2016-04-27
|\ | | | | Fix coverity errors in `haslocaldir()` and `getcwd()`.
| * Fix coverity errors in haslocaldir() and getcwd.HiPhish2016-04-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Vim function `haslocaldir()` would crash if the users called it with the two arguments `-1, -1`. Now it returns `0` in that case. The coverity issue was complaining about a NULL dereference, but there can never be a case where the pointer `tp` is NULL and being dereferenced. An assertion has been put in place to satisfy coverity. Furthermore the functions themselves have been cleaned up. First of all the documentation comment for the different scopes has been extended and a macro for the minimum scope has been introduced. In both functions any time a scope is used as a range (e.g. in a loop) macros instead of actuals scopes are used, that makes the functions more robust if new scopes are added. Second, in the implementation of `getcwd()` there was a superfluous loop, it has been removed completely. I also changed all `goto end` to plaing `return` statements by moving the allocation of `cwd` down, that way there is no need for `goto` anymore.
* | Merge pull request #4625 from brcolow/vim-7.4.1075Justin M. Keyes2016-04-27
|\ \ | | | | | | vim-patch: 7.4.1075
| * | vim-patch: 7.4.1075Michael Ennen2016-04-26
| | | | | | | | | | | | | | | | | | | | | Problem: Crash when using an invalid command. Solution: Fix generating the error message. (Dominique Pelle) https://github.com/vim/vim/commit/05fe017c1ac0503b706dad695097572fde01ab0b
* | | Merge pull request #4655 from brcolow/vim-7.4.1035Justin M. Keyes2016-04-27
|\ \ \ | | | | | | | | vim-patch: 7.4.1035
| * | | vim-patch: 7.4.1035Michael Ennen2016-04-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: An Ex range gets adjusted for folded lines even when the range is not using line numbers. Solution: Only adjust line numbers for folding. (Christian Brabandt) https://github.com/vim/vim/commit/a3306958dcb9aadff1e1e8521d908d86b10ac99a
* | | | vim-patch:7.4.1296KillTheMule2016-04-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Cursor changes column with up motion when the matchparen plugin saves and restores the cursor position. (Martin Kunev) Solution: Make sure curswant is updated before invoking the autocommand. https://github.com/vim/vim/commit/f068dcafcfe0c8018e5a559c50769ca1364bd9a5 Applied manually. Could reproduce the bug with vim/vim@4d8747c but not with vim/vim@2693ca2, so it must have appeared inbetween. For discussion, see https://groups.google.com/forum/#!msg/vim_dev/t2sdeFhkybs/WEtLJpCODQAJ http://vim.1045645.n5.nabble.com/Cursor-behaviour-change-td5726895.html Could not reproduce with current nvim master.
* | | | Merge pull request #4622 from Shougo/vim-7.4.1753Justin M. Keyes2016-04-27
|\ \ \ \ | |_|_|/ |/| | | vim-patch:7.4.1753
| * | | vim-patch:7.4.1753Shougo Matsushita2016-04-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: "noinsert" in 'completeopt' is sometimes ignored. Solution: Set the variables when the 'completeopt' was set. (Ozaki Kiichi) https://github.com/vim/vim/commit/c020042083b9c0a4e932b562c3bef97c76328e18
* | | | vim-patch:7.4.1006 #4605Michael Ennen2016-04-27
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: The fix in patch 7.3.192 is not tested. Solution: Add a test, one for each regexp engine. (Elias Diem) https://github.com/vim/vim/commit/96c664af27ec9535f2c3cd9b889faad3e9460ad6 The patch was applied to 044_099_regexp_multibyte_magic_spec.lua as these two legacy tests (44 and 99) were merged together (and de-duplicated) in Neovim.
* | | Merge pull request #4649 from justinmk/vimpatchesJustin M. Keyes2016-04-27
|\ \ \ | | | | | | | | vim-patch:7.4.1092
| * | | remove disable_char_avail_for_testing()Justin M. Keyes2016-04-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | test_cursor_func.vim hangs at the call to disable_char_avail_for_testing(). The test does not actually need this function (and it correctly fails if the fix from 7.4.1300 is reverted). Given that disable_char_avail_for_testing is a gigantic hack, if we can avoid it let's do so.
| * | | vim-patch:7.4.1118Justin M. Keyes2016-04-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Tests hang in 24 line terminal. Solution: Set the 'more' option off. https://github.com/vim/vim/commit/a99b90437af730dcafd9143c0942c87777a00d52
| * | | vim-patch:7.4.1092Justin M. Keyes2016-04-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: It is not simple to test for an exception and give a proper error message. Solution: Add assert_exception(). https://github.com/vim/vim/commit/a803c7f94070f94b831fdfd1984f288c8b825b5d
| * | | legacy test: MakefileJustin M. Keyes2016-04-25
| | | |
| * | | Satisfy the linter.KillTheMule2016-04-25
| | | |
| * | | vim-patch:7.4.1300KillTheMule2016-04-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Cannot test CursorMovedI because there is typeahead. Solution: Add disable_char_avail_for_testing(). https://github.com/vim/vim/commit/2ab375e54ef4eac438d1aef8b99d9e71f2fa0c63 Most of it manually applied.
| * | | vim-patch:5a46a58KillTheMule2016-04-25
| | |/ | |/| | | | | | | | | | | | | Add missing test file. https://github.com/vim/vim/commit/5a46a58eb6e50cb5204909cc2202e3400761263f
* | | Merge pull request #4630 from jamessan/vim-7.4.613Justin M. Keyes2016-04-26
|\ \ \ | | | | | | | | vim-patch:7.4.613
| * | | regexp_nfa.c: Fix various linter errorsJames McCoy2016-04-25
| | | |
| * | | vim-patch:7.4.613James McCoy2016-04-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: The NFA engine does not implement the 'redrawtime' time limit. Solution: Implement the time limit. https://github.com/vim/vim/commit/70781ee4035b5fd5e3cbb3fe4c7646e19119f0a8
* | | | Merge pull request #4593 from ZyX-I/length-functionsJustin M. Keyes2016-04-26
|\ \ \ \ | |_|/ / |/| | | Make some function accept strings with length in place of just strings
| * | | *: Fix linter errorsZyX2016-04-18
| | | |
| * | | ex_getln: Make get_histtype return HIST_DEFAULT if neededZyX2016-04-18
| | | |
| * | | ex_getln: Make get_histtype accept length argumentZyX2016-04-18
| | | |
| * | | option: Allow zero-length optionsZyX2016-04-18
| | | | | | | | | | | | | | | | | | | | Code that expected NUL-terminated strings allowed them and this behaviour is actually used.
| * | | option: Use findoption_len in do_setZyX2016-04-18
| | | |
| * | | option: Add find_key_option_len functionZyX2016-04-18
| | | |
| * | | option: Add findoption_len functionZyX2016-04-18
| | | | | | | | | | | | | | | | It is like findoption(), but works with non-NUL-terminated strings.
| * | | keymap: Make replace_termcodes and friends accept length and cpo_flagsZyX2016-04-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Reasons: - One does not have to do `s[len] = NUL` to work with these functions if they do not need to replace the whole string: thus `s` may be const. - One does not have to save/restore p_cpo to work with them.
* | | | Merge pull request #4647 from justinmk/vimpatchesJustin M. Keyes2016-04-26
|\ \ \ \ | | | | | | | | | | version.c: update NA; vim-patch:7.4.998
| * | | | vim-patch:7.4.998Justin M. Keyes2016-04-25
| | | | |
| * | | | version.c: update NAKillTheMule2016-04-25
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7.4.797: - Modified function redraw_asap was removed in https://github.com/neovim/neovim/commit/e0e41b30c61922e099a067ac5c137e745699a1aa, together with its only caller check_termcode. - Grepping for the following regexps did not yield any result in nvim/src and its subdirectories: rows.*\*.*Columns (lines modified often), ScreenLinesC\[r\] (one of the sources of the bug), msg_scrolled followed by grepping for NORMAL (another line that was changed for the bug) - The out-of-bound access was on the array *screenlineC[MAX_MCO] (see the diff). I grepped for MAX_MCO an checked every array of that length for out-of-bounds access in its scope (I did not check for called functions, e.g. utfc_ptr2char(p, u8cc) where u8cc was of length MAX_MCO). I did not find any. - The code for drawing on the screen was moved to the TUI, which was newly written. 7.4.733: - test_listchars was converted to a lua test in https://github.com/neovim/neovim/pull/2492 - Since no file is sourced anymore, the behavior of the lua test should not depend on the setting of ff
* | | | Merge pull request #4631 from KillTheMule/vim-7.4.871Justin M. Keyes2016-04-25
|\ \ \ \ | |/ / / |/| | | vim-patch:7.4.871
| * | | Happy little, happy little, happy little linterKillTheMule2016-04-22
| | | |
| * | | vim-patch:7.4.871KillTheMule2016-04-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Vim leaks memory, when 'wildignore' filters out all matches. Solution: Free the files array when it becomes empty. https://github.com/vim/vim/commit/7b256fe7445b46929f660ea74e9090418f857696 The only nontrivial part of 7.4.871 missing (renamings of variables are in another commit; freeing *files after 0 matches was already there, just FAIL was not returned in that case)
| * | | The trivial part of 7.4.871KillTheMule2016-04-22
| | | |
* | | | Merge pull request #4325 from watiko/vim-7.4.984Justin M. Keyes2016-04-25
|\ \ \ \ | | | | | | | | | | vim-patch:7.4.{984,1093}
| * | | | vim-patch:7.4.1093watiko2016-03-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Typo in test goes unnoticed. Solution: Fix the typo. Give error for wrong arguments to cursor(). (partly by Hirohito Higashi) Add a test for cursor(). https://github.com/vim/vim/commit/24c4d539eed33e8073f8f9fe2bee497bbba935a4
| * | | | tests: Migrate legacy test searchposwatiko2016-03-02
| | | | |
| * | | | vim-patch:7.4.984watiko2016-03-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: searchpos() always starts searching in the first column, which is not what some people expect. (Brett Stahlman) Solution: Add the 'z' flag: start at the specified column. https://github.com/vim/vim/commit/ad4d8a192abf44b89371af87d70b971cd654b799
* | | | | Merge pull request #4632 from KillTheMule/vim-7.4.822Justin M. Keyes2016-04-25
|\ \ \ \ \ | | | | | | | | | | | | vim-patch:7.4.822
| * | | | | Linting.KillTheMule2016-04-23
| | | | | |
| * | | | | vim-patch:7.4.822KillTheMule2016-04-23
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: More problems reported by coverity. Solution: Avoid the warnings. (Christian Brabandt) https://github.com/vim/vim/commit/cde885473099296c4837de261833f48b24caf87c Applied manually. Files that do not exst anymore: gui.c gui_w16.c gui_w32.c if_xcmdsrv.c os_unix.c
* | | | | Merge #4303 'vim-patch:7.4.{951,1143,1144}'.Justin M. Keyes2016-04-25
|\ \ \ \ \
| * | | | | test: Remove migrated legacy test from Makefilewatiko2016-03-02
| | | | | |
| * | | | | tests: Migrate legacy test sortwatiko2016-03-02
| | | | | |
| * | | | | vim-patch:7.4.1144watiko2016-03-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Can't build on several systems. Solution: Include float.h. (Christian Robinson, closes vim/vim#570 vim/vim#571) https://github.com/vim/vim/commit/17576a1e33d71b5602cee86bf220a806c8412605
| * | | | | vim-patch:7.4.1143watiko2016-03-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Can't sort on floating point numbers. Solution: Add the "f" flag to ":sort". (Alex Jakushev) Also add the "f" flag to sort(). https://github.com/vim/vim/commit/f7edf40448a09e04eec3bd05e043f7fea93b07c9
| * | | | | vim-patch:7.4.951watiko2016-03-02
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Sorting number strings does not work as expected. (Luc Hermitte) Solution: Add the 'N" argument to sort() https://github.com/vim/vim/commit/b00da1d6d1655cb6e415f84ecc3be5ff3b790811