aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval.c
Commit message (Collapse)AuthorAge
...
* 'termguicolors' #4690Shougo Matsushita2016-05-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | TODO: Only works at startup (i.e., in the user's init.vim/vimrc/--cmd), but it should probably work at any time. --- patch 7.4.1799 Problem: 'guicolors' is a confusing option name. Solution: Use 'termguicolors' instead. (Hirohito Higashi) https://github.com/vim/vim/commit/61be73bb0f965a895bfb064ea3e55476ac175162 patch 7.4.1806 Problem: 'termguicolors' option missing from the options window. Solution: Add the entry. https://github.com/vim/vim/commit/8e3d1b6326c103cc92f8d07b1161ee5172acf201 patch 7.4.1808 Problem: Using wrong feature name to check for 'termguicolors'. Solution: Use the right feature name. (Ken Takata) https://github.com/vim/vim/commit/8a24b794b89916c8074892e7b25121a21f1fa9c9 patch 7.4.1809 Problem: Using wrong short option name for 'termguicolors'. Solution: Use the option name. https://github.com/vim/vim/commit/868cfc19bb079a16ca58884b551486566f35419b
* Merge pull request #4588 from KillTheMule/vim-patch-1285Justin M. Keyes2016-05-10
|\ | | | | vim-patch: 7.4.1285
| * vim-patch:7.4.1285KillTheMule2016-05-08
| | | | | | | | | | | | | | | | | | | | | | Problem: Cannot measure elapsed time. Solution: Add reltimefloat(). https://github.com/vim/vim/commit/79c2c881bb7ae1cbdeeff91d4875b4bf2e54df06 Applied manually. None of the ifdef's applies anymore, and proftime_T was changed into an uint64_T, so the function profile_float to convert proftime_T to float is not needed in nvim.
* | Merge pull request #4720 from jbradaric/vim-7.4.1042Justin M. Keyes2016-05-10
|\ \ | | | | | | vim-patch:7.4.1042
| * | vim-patch:7.4.1042Jurica Bradaric2016-05-08
| |/ | | | | | | | | | | | | | | Problem: g-CTRL-G shows the word count, but there is no way to get the word count in a script. Solution: Add the wordcount() function. (Christian Brabandt) https://github.com/vim/vim/commit/ed767a2073ef150971b0439a58e7ee582af6984e
* | Linting all the daysJames McCoy2016-05-06
| |
* | vim-patch:7.4.1015James McCoy2016-05-06
|/ | | | | | | | | Problem: The column is not restored properly when the matchparen plugin is used in Insert mode and the cursor is after the end of the line. Solution: Set the curswant flag. (Christian Brabandt). Also fix highlighting the match of the character before the cursor. https://github.com/vim/vim/commit/c21d67e33c1b42a492e04788cbb14a23a6724e39
* vim-patch:7.4.672KillTheMule2016-05-02
| | | | | | | | | | | Problem: When completing a shell command, directories in the current directory are not listed. Solution: When "." is not in $PATH also look in the current directory for directories. https://github.com/vim/vim/commit/b5971141dff0c69355fd64196fcc0d0d071d4c82 Most of it applied manually.
* *: Fix new linter errorsZyX2016-05-01
| | | | Originally there were 128 new errors, so I thought this is a good idea to fix all of them. Of course, this commit also fixes many suppressed errors.
* normal: convert MCHAR etc operator and register types to enum MotionTypeBjörn Linse2016-05-01
|
* 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 #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.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
| * 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.
* | 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
| |
| * 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 #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
| * | 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 #4303 'vim-patch:7.4.{951,1143,1144}'.Justin M. Keyes2016-04-25
|\ \ \
| * | | 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
* | | Merge pull request #4367 from jbradaric/vim-7.4.1107Justin M. Keyes2016-04-22
|\ \ \ | | | | | | | | vim-patch:7.4.{1107,1114,1116,1117,1120}
| * | | Merge tempfile.c back into fileio.cJurica Bradaric2016-04-20
| | | |
| * | | vim-patch:7.4.1107Jurica Bradaric2016-04-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Vim can create a directory but not delete it. Solution: Add an argument to delete() to make it possible to delete a directory, also recursively. https://github.com/vim/vim/commit/da440d21a6b94d7f525fa7be9b1417c78dd9aa4c
* | | | Merge #3229 ':tcd'Justin M. Keyes2016-04-21
|\ \ \ \
| * | | | tcd: doc, error messagesJustin M. Keyes2016-04-21
| | | | |
| * | | | Implement tab-local working directory feature.HiPhish2016-04-20
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | New ex commands: 'tcd', 'tchdir' Changed Vimscript functions: 'haslocaldir', 'getcwd' The ex-commands ':tcd' and ':tchdir' are the tab-local equivalents of ':lcd' and ':lchdir'. There are no new Vimscript functions introduced, instead the functions 'haslocaldir' and 'getcwd' take in optional arguments. See the documentation for details Since there is now different levels of local directory a simple boolean at source level is no longer sufficient; a new enumeration type is used for the scope-level from now on. The documentation has been accommodated for these new commands and functional tests have been written to test the feature.
* / / / eval: let getreg() return valid list for an undefined registerBjörn Linse2016-04-21
|/ / / | | | | | | | | | | | | vim-patch:7.4.1755 this prevents a crash when the list is used in setreg() later
* | | Merge pull request #4589 from gregorias/patch_1113Justin M. Keyes2016-04-20
|\ \ \ | | | | | | | | vim-patch: 7.4.1113
| * | | vim-patch:7.4.1113Grzegorz Milka2016-04-19
| | | | | | | | | | | | | | | | | | | | Problem: Using {ns} in variable name does not work. (lilydjwg) Solution: Fix recognizing colon. Add a test.
* | | | v:windowid #4608Rui Abreu Ferreira2016-04-19
|/ / / | | | | | | | | | | | | | | | Set v:windowid as writeable (but read only in the sandbox). References #3626
* | | *: Fix preincrement lint errorsZyX2016-04-18
| | |
* | | eval/encode: Make sure that encoder can encode NULL variablesZyX2016-04-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | Adds two undocumented v: variables: _null_list and _null_dict because I do not know a reproducible way to get such lists (though I think I heard about this) and dictionaries (do not remember hearing about them). NULL strings are obtained using $XXX_UNEXISTENT_VAR_XXX. Fixes crash in json_encode($XXX_UNEXISTENT_VAR_XXX). Other added tests worked fine before this commit.
* | | *: Make set_vim_var_\* functions have proper argument typesZyX2016-04-18
| | |
* | | eval: Treat [] and [""] as any other empty stringZyX2016-04-18
| | |
* | | eval: Fix overflow in error message in f_json_decodeZyX2016-04-18
| | |
* | | eval: Remove assert expressionZyX2016-04-18
| | | | | | | | | | | | | | | GCC on travis thinks that 1. It is not constant. 2. Left-hand operand of comma has no effect (-Werror=unused-variable).
* | | eval: Do not break when VimVarIndex and vimvars order mismatchesZyX2016-04-18
| | | | | | | | | | | | Also makes sure that compiler will error out when new name is longer then vv_filler.
* | | eval: Rename json* functions to json_*ZyX2016-04-18
| | |
* | | api: Replace set_var(name, NIL) with del_var(name)ZyX2016-04-18
| | |
* | | eval: Fix QuickBuild failuresZyX2016-04-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Compiler used by one VM in QuickBuild has found a number of false positives. Everything is fine on travis. List of failures: From [QuickBuild][1], build [7429][2]: 14:38:19,945 WARN - /home/quickbuild/buildagent/workspace/root/neovim/pull-requests-automated/src/nvim/eval.c: In function ‘assert_bool’: 14:38:19,945 WARN - /home/quickbuild/buildagent/workspace/root/neovim/pull-requests-automated/src/nvim/eval.c:7551:40: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare] 14:38:20,058 WARN - cc1: all warnings being treated as errors . This is not making much sense (7551:40 is `!=` in `{SpecialVarValue} != ({bool}?{SpecialVarValue}:{SpecialVarValue})`), but this error is present. --- Also fail from [build][3] [4930][4]: 15:47:00,853 WARN - /home/quickbuild/buildagent/workspace/root/neovim/pull-requests-automated/src/nvim/eval/encode.c: In function ‘encode_read_from_list’: 15:47:00,853 WARN - /home/quickbuild/buildagent/workspace/root/neovim/pull-requests-automated/src/nvim/eval/encode.c:258:30: error: conversion to ‘char’ from ‘int’ may alter its value [-Werror=conversion] , pointing to `:` in `{char} = ({char} == {const} ? {const} : {char})` where `{const}` is character constant like `'\n'`. I have no idea where exactly it saw conversion, so simply casted everything to (char). --- [Build][5] error: 08:32:03,472 WARN - /home/quickbuild/buildagent/workspace/root/neovim/pull-requests-automated/src/nvim/eval.c: In function ‘tv_equal’: 08:32:03,472 WARN - /home/quickbuild/buildagent/workspace/root/neovim/pull-requests-automated/src/nvim/eval.c:5077:1: error: control reaches end of non-void function [-Werror=return-type] --- Build [4949][7]: 11:28:00,578 WARN - /home/quickbuild/buildagent/workspace/root/neovim/pull-requests-automated/src/nvim/eval.c: In function ‘f_type’: 11:28:00,578 WARN - /home/quickbuild/buildagent/workspace/root/neovim/pull-requests-automated/src/nvim/eval.c:16085:24: error: ‘n’ may be used uninitialized in this function [-Werror=uninitialized] 11:28:00,581 WARN - /home/quickbuild/buildagent/workspace/root/neovim/pull-requests-automated/src/nvim/eval.c: In function ‘f_empty’: 11:28:00,581 WARN - /home/quickbuild/buildagent/workspace/root/neovim/pull-requests-automated/src/nvim/eval.c:8505:24: error: ‘n’ may be used uninitialized in this function [-Werror=uninitialized] [1]: http://neovim-qb.szakmeister.net/wicket/page?5-1.ILinkListener-content-buildTab-panel-masterStep-body-children-0-step-body-children-2-body-children-3-step-body-children-0-step-body-children-0-step-head-logLink [2]: http://neovim-qb.szakmeister.net/build/4929 [3]: http://neovim-qb.szakmeister.net/build/4930 [4]: http://neovim-qb.szakmeister.net/wicket/page?1-1.ILinkListener-content-buildTab-panel-masterStep-body-children-0-step-body-children-1-body-children-3-step-body-children-0-step-body-children-0-step-head-logLink [5]: http://neovim-qb.szakmeister.net/build/4948/step_status [7]: http://neovim-qb.szakmeister.net/build/4949
* | | eval: Port parts of 7.4.1267 that are not already presentZyX2016-04-18
| | |
* | | eval: Make assert_true and assert_false accept v:true and v:falseZyX2016-04-18
| | |
* | | *: Fix linter errorsZyX2016-04-18
| | |