summaryrefslogtreecommitdiff
path: root/src/evalfunc.c
Commit message (Collapse)AuthorAgeFilesLines
* patch 8.2.1592: Vim9: passing "true" to char2nr() failsv8.2.1592Bram Moolenaar2020-09-041-1/+1
| | | | | Problem: Vim9: passing "true" to char2nr() fails. Solution: Use tv_get_bool_chk(). (closes #6865)
* patch 8.2.1588: cannot read back the prompt of a prompt bufferv8.2.1588Bram Moolenaar2020-09-041-0/+1
| | | | | Problem: Cannot read back the prompt of a prompt buffer. Solution: Add prompt_getprompt(). (Ben Jackson, closes #6851)
* patch 8.2.1577: Vim9: hasmapto()/mapcheck()/maparg() do nottake "true" argv8.2.1577Bram Moolenaar2020-09-021-1/+1
| | | | | | Problem: Vim9: hasmapto(), mapcheck() and maparg() do not take "true" as argument. Solution: Use tv_get_bool(). (closes #6822, closes #6824)
* patch 8.2.1576: Vim9: index() does not take "true" as argumentv8.2.1576Bram Moolenaar2020-09-021-1/+1
| | | | | Problem: Vim9: index() does not take "true" as argument. Solution: Use tv_get_bool_chk(). (closes #6823)
* patch 8.2.1573: Vim9: getreg() does not take "true" as argumentv8.2.1573Bram Moolenaar2020-09-021-2/+2
| | | | | Problem: Vim9: getreg() does not take "true" as argument. Solution: Use tv_get_bool_chk(). (closes #6820)
* patch 8.2.1572: Vim9: expand() does not take "true" as argumentv8.2.1572Bram Moolenaar2020-09-021-2/+2
| | | | | Problem: Vim9: expand() does not take "true" as argument. Solution: Use tv_get_bool_chk(). (closes #6819)
* patch 8.2.1569: Vim9: fixes not tested; failure in getchangelist()v8.2.1569Bram Moolenaar2020-09-021-6/+1
| | | | | Problem: Vim9: fixes for functions not tested; failure in getchangelist(). Solution: Add tests. (closes #6813, closes #6815, closes #6817)
* patch 8.2.1544: cannot translate messages in a Vim scriptv8.2.1544Bram Moolenaar2020-08-301-0/+22
| | | | | | Problem: Cannot translate messages in a Vim script. Solution: Add gettext(). Try it out for a few messages in the options window.
* patch 8.2.1536: cannot get the class of a character; emoji widths are wrongv8.2.1536Bram Moolenaar2020-08-281-0/+1
| | | | | | | Problem: Cannot get the class of a character; emoji widths are wrong in some environments. Solution: Add charclass(). Update some emoji widths. Add script to check emoji widths.
* patch 8.2.1535: it is not possible to specify cell widths of charactersv8.2.1535Bram Moolenaar2020-08-281-0/+1
| | | | | Problem: It is not possible to specify cell widths of characters. Solution: Add setcellwidths().
* patch 8.2.1533: Vim9: error when passing getreginfo() result to setreg()v8.2.1533Bram Moolenaar2020-08-281-1/+1
| | | | | Problem: Vim9: error when passing getreginfo() result to setreg(). Solution: Use dict_get_bool() for "isunnamed". (closes #6784)
* patch 8.2.1517: cannot easily get the character under the cursorv8.2.1517Bram Moolenaar2020-08-231-5/+13
| | | | | Problem: Cannot easily get the character under the cursor. Solution: Add the {chars} argument to strpart().
* patch 8.2.1491: Vim9: crash when compiling heredoc lines start with commentv8.2.1491Bram Moolenaar2020-08-201-2/+1
| | | | | | Problem: Vim9: crash when compiling heredoc lines start with comment. Solution: Skip over NULL pointers. Do not remove comment and empty lines when fetching function lines. (closes #6743)
* patch 8.2.1479: Vim9: error for list index uses wrong line numberv8.2.1479Bram Moolenaar2020-08-181-1/+1
| | | | | | Problem: Vim9: error for list index uses wrong line number. Solution: Set source line number. (closes #6724) Add a way to assert the line number of the error with assert_fails().
* patch 8.2.1447: Vim9: return type of keys() is list<any>v8.2.1447Bram Moolenaar2020-08-141-1/+1
| | | | | Problem: Vim9: return type of keys() is list<any>. Solution: Should be list<string>. (closes #6711)
* patch 8.2.1435: Vim9: always converting to string for ".." leads to mistakesv8.2.1435Bram Moolenaar2020-08-121-1/+1
| | | | | Problem: Vim9: always converting to string for ".." leads to mistakes. Solution: Only automatically convert simple types.
* patch 8.2.1422: the Mac GUI implementation is outdatedv8.2.1422Bram Moolenaar2020-08-111-7/+1
| | | | | | | Problem: The Mac GUI implementation is outdated and probably doesn't even work. Solution: Remove the Mac GUI code. The MacVim project provides the supported Vim GUI version.
* patch 8.2.1397: Vim9: return type of maparg() not adjusted for fourth argv8.2.1397Bram Moolenaar2020-08-081-1/+10
| | | | | Problem: Vim9: return type of maparg() not adjusted for fourth argument. Solution: Check if fourth argument is present. (closes #6645)
* patch 8.2.1380: Vim9: return type of getreg() is always a stringv8.2.1380Bram Moolenaar2020-08-061-1/+10
| | | | | Problem: Vim9: return type of getreg() is always a string. Solution: Use list of strings when there are three arguments. (closes #6633)
* patch 8.2.1281: the "trailing characters" error can be hard to understandv8.2.1281Bram Moolenaar2020-07-231-2/+2
| | | | | Problem: The "trailing characters" error can be hard to understand. Solution: Add the trailing characters to the message.
* patch 8.2.1265: crash with EXITFREE when split() failsv8.2.1265Bram Moolenaar2020-07-211-2/+3
| | | | | Problem: Crash with EXITFREE when split() fails. Solution: Restore 'cpoptions'.
* patch 8.2.1241: cannot use getbufinfo() as a methodv8.2.1241Bram Moolenaar2020-07-181-1/+1
| | | | | Problem: Cannot use getbufinfo() as a method. Solution: Support using getbufinfo() as a method. (closes #6458)
* patch 8.2.1168: wrong method argument for appendbufline()v8.2.1168Bram Moolenaar2020-07-091-1/+1
| | | | | Problem: Wrong method argument for appendbufline(). Solution: Use FEARG_3.
* patch 8.2.1167: Vim9: builtin function method call only supports first argv8.2.1167Bram Moolenaar2020-07-091-5/+7
| | | | | Problem: Vim9: builtin function method call only supports first argument. Solution: Shift arguments when needed. (closes #6305, closes #6419)
* patch 8.2.1144: Vim9: return type of reverse() is anyv8.2.1144Bram Moolenaar2020-07-051-1/+1
| | | | | Problem: Vim9: return type of reverse() is any. Solution: Use the type of the first argument.
* patch 8.2.1143: Vim9: return type of remove() is anyv8.2.1143Bram Moolenaar2020-07-051-1/+12
| | | | | Problem: Vim9: return type of remove() is any. Solution: Use the member type of the first argument, if known.
* patch 8.2.1142: Vim9: return type of insert() is anyv8.2.1142Bram Moolenaar2020-07-051-1/+1
| | | | | Problem: Vim9: return type of insert() is any. Solution: Use type of the first argument.
* patch 8.2.1141: Vim9: return type of filter() is anyv8.2.1141Bram Moolenaar2020-07-051-1/+1
| | | | | Problem: Vim9: return type of filter() is any. Solution: Use type of the argument.
* patch 8.2.1140: Vim9: return type of extend() is anyv8.2.1140Bram Moolenaar2020-07-051-1/+1
| | | | | Problem: Vim9: return type of extend() is any. Solution: Use type of the argument.
* patch 8.2.1138: Vim9: return type of copy() and deepcopy() is anyv8.2.1138Bram Moolenaar2020-07-051-2/+2
| | | | | Problem: Vim9: return type of copy() and deepcopy() is any. Solution: Use type of the argument.
* patch 8.2.1136: Vim9: return type of argv() is always anyv8.2.1136Bram Moolenaar2020-07-051-1/+12
| | | | | Problem: Vim9: return type of argv() is always any. Solution: Use list<string> if there is no argument.
* patch 8.2.1133: Vim9: return type of add() is not specific enoughv8.2.1133Bram Moolenaar2020-07-051-1/+1
| | | | | Problem: Vim9: return type of add() is not specific enough. Solution: Return the type of the first argument. (closes #6395)
* patch 8.2.1132: Vim9: return type of repeat() is not specific enoughv8.2.1132Bram Moolenaar2020-07-051-2/+2
| | | | | Problem: Vim9: return type of repeat() is not specific enough. Solution: Return the type of the first argument. (closes #6395)
* patch 8.2.1111: inconsistent naming of get_list_tv() and eval_dict()v8.2.1111Bram Moolenaar2020-07-011-1/+1
| | | | | | Problem: Inconsistent naming of get_list_tv() and eval_dict(). Solution: Rename get_list_tv() to eval_list(). Similarly for eval_number(), eval_string(), eval_lit_string() and a few others.
* patch 8.2.1096: Vim9: return type of getqflist() is wrongv8.2.1096Bram Moolenaar2020-06-301-2/+26
| | | | | | Problem: Vim9: return type of getqflist() is wrong. Solution: Let the return type depend on the arguments. Also for getloclist(). (closes #6367)
* patch 8.2.1082: Coverity complains about ignoring dict_add() return valuev8.2.1082Bram Moolenaar2020-06-291-4/+4
| | | | | Problem: Coverity complains about ignoring dict_add() return value. Solution: Add (void).
* patch 8.2.1047: Vim9: script cannot use line continuation like :def functionv8.2.1047Bram Moolenaar2020-06-241-1/+1
| | | | | | Problem: Vim9: script cannot use line continuation like in a :def function. Solution: Pass the getline function pointer to the eval() functions. Use it for addition and multiplication operators.
* patch 8.2.1035: setreg() does not always clear the registerv8.2.1035Bram Moolenaar2020-06-221-36/+61
| | | | | | Problem: setreg() does not always clear the register. Solution: Clear the register if the dict argument is empty. (Andy Massimino, closes #3370)
* patch 8.2.1003: Vim9: return type of sort() is too genericv8.2.1003Bram Moolenaar2020-06-181-1/+9
| | | | | Problem: Vim9: return type of sort() is too generic. Solution: Get type from the first argument. (closes #6292)
* patch 8.2.0988: getting directory contents is always case sortedv8.2.0988Bram Moolenaar2020-06-161-2/+2
| | | | | Problem: Getting directory contents is always case sorted. Solution: Add sort options and v:collate. (Christian Brabandt, closes #6229)
* patch 8.2.0970: terminal properties are not available in Vim scriptv8.2.0970Bram Moolenaar2020-06-131-0/+1
| | | | | Problem: Terminal properties are not available in Vim script. Solution: Add the terminalprops() function.
* patch 8.2.0945: cannot use "z=" when 'spell' is offv8.2.0945Bram Moolenaar2020-06-101-2/+44
| | | | | | Problem: Cannot use "z=" when 'spell' is off. Solution: Make "z=" work even when 'spell' is off. (Christian Brabandt, Gary Johnson, closes #6227)
* patch 8.2.0935: flattening a list with existing code is slowv8.2.0935Bram Moolenaar2020-06-081-0/+1
| | | | | Problem: Flattening a list with existing code is slow. Solution: Add flatten(). (Mopp, closes #3676)
* patch 8.2.0928: many type casts are used for vim_strnsave()v8.2.0928Bram Moolenaar2020-06-071-3/+3
| | | | | | Problem: Many type casts are used for vim_strnsave(). Solution: Make the length argument size_t instead of int. (Ken Takata, closes #5633) Remove some type casts.
* patch 8.2.0924: cannot save and restore a register properlyv8.2.0924Bram Moolenaar2020-06-071-4/+122
| | | | | | Problem: Cannot save and restore a register properly. Solution: Add getreginfo() and make setreg() accept a dictionary. (Andy Massimino, closes #3370)
* patch 8.2.0918: duplicate code for evaluating expression argumentv8.2.0918Bram Moolenaar2020-06-071-23/+9
| | | | | Problem: Duplicate code for evaluating expression argument. Solution: Merge the code and make the use more flexible.
* patch 8.2.0915: search() cannot skip over matches like searchpair() canv8.2.0915Bram Moolenaar2020-06-061-6/+49
| | | | | Problem: Search() cannot skip over matches like searchpair() can. Solution: Add an optional "skip" argument. (Christian Brabandt, closes #861)
* patch 8.2.0893: assert_equalfile() does not take a third argumentv8.2.0893Bram Moolenaar2020-06-031-1/+1
| | | | | Problem: Assert_equalfile() does not take a third argument. Solution: Implement the third argument. (Gary Johnson)
* patch 8.2.0886: cannot use octal numbers in scriptversion 4v8.2.0886Bram Moolenaar2020-06-021-1/+1
| | | | | Problem: Cannot use octal numbers in scriptversion 4. Solution: Add the "0o" notation. (Ken Takata, closes #5304)
* patch 8.2.0878: no reduce() functionv8.2.0878Bram Moolenaar2020-06-011-0/+1
| | | | | Problem: No reduce() function. Solution: Add a reduce() function. (closes #5481)