summaryrefslogtreecommitdiff
path: root/src/userfunc.c
Commit message (Collapse)AuthorAgeFilesLines
* patch 8.1.0897: can modify a:000 when using a referencev8.1.0897Bram Moolenaar2019-02-111-2/+2
| | | | | | Problem: Can modify a:000 when using a reference. Solution: Make check for locked variable stricter. (Ozaki Kiichi, closes #3930)
* patch 8.1.0888: the a: dict is not immutable as documentedv8.1.0888Bram Moolenaar2019-02-101-1/+2
| | | | | | Problem: The a: dict is not immutable as documented. Solution: Make the a:dict immutable, add a test. (Ozaki Kiichi, Yasuhiro Matsumoto, closes #3929)
* patch 8.1.0868: crash if triggering garbage collector after a function callv8.1.0868Bram Moolenaar2019-02-021-2/+2
| | | | | | | Problem: Crash if triggering garbage collector after a function call. (Michael Henry) Solution: Don't call the garbage collector right away, do it later. (closes #3894)
* patch 8.1.0826: too many #ifdefsv8.1.0826Bram Moolenaar2019-01-261-2/+0
| | | | | Problem: Too many #ifdefs. Solution: Graduate FEAT_VIRTUALEDIT. Adds about 10Kbyte to the code.
* patch 8.1.0800: may use a lot of memory when a function refers itselfv8.1.0800Bram Moolenaar2019-01-231-0/+13
| | | | | | | Problem: May use a lot of memory when a function creates a cyclic reference. Solution: After saving a funccal many times, invoke the garbage collector. (closes #3835)
* patch 8.1.0785: depending on the configuration some functions are unusedv8.1.0785Bram Moolenaar2019-01-201-0/+2
| | | | | | Problem: Depending on the configuration some functions are unused. Solution: Add more #ifdefs, remove unused functions. (Dominique Pelle, closes #3822)
* patch 8.1.0779: argument for message functions is inconsistentv8.1.0779Bram Moolenaar2019-01-191-22/+22
| | | | | Problem: Argument for message functions is inconsistent. Solution: Make first argument to msg() "char *".
* patch 8.1.0743: giving error messages is not flexiblev8.1.0743Bram Moolenaar2019-01-131-37/+37
| | | | | | | | Problem: Giving error messages is not flexible. Solution: Add semsg(). Change argument from "char_u *" to "char *", also for msg() and get rid of most MSG macros. (Ozaki Kiichi, closes #3302) Also make emsg() accept a "char *" argument. Get rid of an enormous number of type casts.
* patch 8.1.0579: cannot attach properties to textv8.1.0579Bram Moolenaar2018-12-131-1/+1
| | | | | Problem: Cannot attach properties to text. Solution: First part of adding text properties.
* patch 8.1.0515: reloading a script gives errors for existing functionsv8.1.0515Bram Moolenaar2018-11-101-2/+7
| | | | | Problem: Reloading a script gives errors for existing functions. Solution: Allow redefining a function once when reloading a script.
* patch 8.1.0511: ml_get error when calling a function with a rangev8.1.0511Bram Moolenaar2018-11-041-0/+7
| | | | | Problem: ml_get error when calling a function with a range. Solution: Don't position the cursor after the last line.
* patch 8.1.0495: :filter only supports some commandsv8.1.0495Bram Moolenaar2018-10-251-0/+2
| | | | | | Problem: :filter only supports some commands. Solution: Add :filter support for more commands. (Marcin Szamotulski, closes #2856)
* patch 8.1.0475: memory not freed on exit when quit in autocmdv8.1.0475Bram Moolenaar2018-10-141-41/+30
| | | | | Problem: Memory not freed on exit when quit in autocmd. Solution: Remember funccal stack when executing autocmd.
* patch 8.1.0365: function profile doesn't specify where it was definedv8.1.0365Bram Moolenaar2018-09-101-0/+9
| | | | | Problem: Function profile doesn't specify where it was defined. Solution: Show the script name and line number.
* patch 8.1.0362: cannot get the script line number when executing a functionv8.1.0362Bram Moolenaar2018-09-101-11/+13
| | | | | | Problem: Cannot get the script line number when executing a function. Solution: Store the line number besides the script ID. (Ozaki Kiichi, closes #3362) Also display the line number with ":verbose set".
* patch 8.1.0229: crash when dumping profiling datav8.1.0229Bram Moolenaar2018-07-291-13/+21
| | | | | Problem: Crash when dumping profiling data. Solution: Reset flag indicating that initialization was done.
* patch 8.1.0177: defining function in sandbox is inconsistentv8.1.0177Bram Moolenaar2018-07-101-7/+22
| | | | | | | Problem: Defining function in sandbox is inconsistent, cannot use :function but can define a lambda. Solution: Allow defining a function in the sandbox, but also use the sandbox when executing it. (closes #3182)
* patch 8.1.0167: lock flag in new dictitem is reset in many placesv8.1.0167Bram Moolenaar2018-07-081-1/+0
| | | | | Problem: Lock flag in new dictitem is reset in many places. Solution: Always reset the lock flag.
* patch 8.1.0130: ":profdel func" does not work if func was called alreadyv8.1.0130Bram Moolenaar2018-06-301-22/+30
| | | | | | | Problem: ":profdel func" does not work if func was called already. (Dominique Pelle) Solution: Reset uf_profiling and add a flag to indicate initialization was done.
* patch 8.1.0019: error when defining a Lambda with index of a function resultv8.1.0019Bram Moolenaar2018-05-221-2/+10
| | | | | | Problem: Error when defining a Lambda with index of a function result. Solution: When not evaluating an expression and skipping a function call, set the return value to VAR_UNKNOWN.
* patch 8.0.1564: too many #ifdefsv8.0.1564Bram Moolenaar2018-03-041-2/+0
| | | | | | Problem: Too many #ifdefs. Solution: Graduate the +autocmd feature. Takes away 450 #ifdefs and increases code size of tiny Vim by only 40 Kbyte.
* patch 8.0.1505: debugger can't break on a conditionv8.0.1505Bram Moolenaar2018-02-111-0/+2
| | | | | Problem: Debugger can't break on a condition. (Charles Campbell) Solution: Add ":breakadd expr". (Christian Brabandt, closes #859)
* patch 8.0.1496: clearing a pointer takes two linesv8.0.1496Bram Moolenaar2018-02-101-6/+2
| | | | | | Problem: Clearing a pointer takes two lines. Solution: Add VIM_CLEAR() and replace vim_clear(). (Hirohito Higashi, closes #2629)
* patch 8.0.1423: error in return not caught by try/catchv8.0.1423Bram Moolenaar2017-12-231-0/+3
| | | | | Problem: Error in return not caught by try/catch. Solution: Call update_force_abort(). (Yasuhiro Matsomoto, closes #2483)
* patch 8.0.1378: autoload script sources itself when defining functionv8.0.1378Bram Moolenaar2017-12-071-1/+1
| | | | | | Problem: Autoload script sources itself when defining function. Solution: Pass TFN_NO_AUTOLOAD to trans_function_name(). (Yasuhiro Matsumoto, closes #2423)
* patch 8.0.1377: cannot call a dict function in autoloaded dictv8.0.1377Bram Moolenaar2017-12-071-1/+1
| | | | | Problem: Cannot call a dict function in autoloaded dict. Solution: Call get_lval() passing the read-only flag.
* patch 8.0.0667: memory access error when command follows :endfuncv8.0.0667Bram Moolenaar2017-06-241-21/+30
| | | | | | Problem: Memory access error when command follows :endfunction. (Nikolai Pavlov) Solution: Make memory handling in :function straightforward. (closes #1793)
* patch 8.0.0663: unexpected error message only when 'verbose' is setv8.0.0663Bram Moolenaar2017-06-231-1/+3
| | | | | Problem: Giving an error message only when 'verbose' set is unexpected. Solution: Give a warning message instead.
* patch 8.0.0655: not easy to make sure a function does not existv8.0.0655Bram Moolenaar2017-06-221-1/+2
| | | | | Problem: Not easy to make sure a function does not exist. Solution: Add ! as an optional argument to :delfunc.
* patch 8.0.0654: no warning for text after :endfunctionv8.0.0654Bram Moolenaar2017-06-221-0/+8
| | | | | | Problem: Text found after :endfunction is silently ignored. Solution: Give a warning if 'verbose' is set. When | or \n are used, execute the text as a command.
* patch 8.0.0548: saving the redo buffer only works one timev8.0.0548Bram Moolenaar2017-04-071-2/+3
| | | | | | | Problem: Saving the redo buffer only works one time, resulting in the "." command not working well for a function call inside another function call. (Ingo Karkat) Solution: Save the redo buffer at every user function call. (closes #1619)
* patch 8.0.0535: memory leak when exiting from within a user functionv8.0.0535Bram Moolenaar2017-04-011-39/+58
| | | | | Problem: Memory leak when exiting from within a user function. Solution: Clear the function call stack on exit.
* patch 8.0.0466: still macros that should be all-capsv8.0.0466Bram Moolenaar2017-03-161-1/+1
| | | | | Problem: There are still a few macros that should be all-caps. Solution: Make a few more macros all-caps.
* patch 8.0.0452: some macros are in lower casev8.0.0452Bram Moolenaar2017-03-121-1/+1
| | | | | Problem: Some macros are in lower case. Solution: Make a few more macros upper case.
* patch 8.0.0297: double free on exit when using a closurev8.0.0297Bram Moolenaar2017-02-021-12/+66
| | | | | Problem: Double free on exit when using a closure. (James McCoy) Solution: Split free_al_functions in two parts. (closes #1428)
* patch 8.0.0287: debug mode: cannot access function argumentsv8.0.0287Bram Moolenaar2017-02-011-1/+1
| | | | | | Problem: Cannot access the arguments of the current function in debug mode. (Luc Hermitte) Solution: use get_funccal(). (Lemonboy, closes #1432, closes #1352)
* patch 8.0.0251: not easy to select Python 2 or 3v8.0.0251Bram Moolenaar2017-01-281-1/+3
| | | | | | Problem: It is not so easy to write a script that works with both Python 2 and Python 3, even when the Python code works with both. Solution: Add 'pyxversion', :pyx, etc. (Marc Weber, Ken Takata)
* patch 8.0.0176: cannot use :change inside a function definitionv8.0.0176Bram Moolenaar2017-01-121-1/+6
| | | | | Problem: Using :change in between :function and :endfunction fails. Solution: Recognize :change inside a function. (ichizok, closes #1374)
* patch 8.0.0074v8.0.0074Bram Moolenaar2016-11-101-2/+2
| | | | | | Problem: Cannot make Vim fail on an internal error. Solution: Add IEMSG() and IEMSG2(). (Domenique Pelle) Avoid reporting an internal error without mentioning where.
* patch 7.4.2293v7.4.2293Bram Moolenaar2016-08-291-1/+1
| | | | | Problem: Modelines in source code are inconsistant. Solution: Use the same line in most files. Add 'noet'. (Naruhiko Nishino)
* patch 7.4.2249v7.4.2249Bram Moolenaar2016-08-241-3/+3
| | | | | Problem: Missing colon in error message. Solution: Add the colon. (Dominique Pelle)
* patch 7.4.2197v7.4.2197Bram Moolenaar2016-08-111-19/+36
| | | | | Problem: All functions are freed on exit, which may hide leaks. Solution: Only free named functions, not reference counted ones.
* patch 7.4.2143v7.4.2143Bram Moolenaar2016-08-011-57/+78
| | | | | | Problem: A funccal is garbage collected while it can still be used. Solution: Set copyID in all referenced functions. Do not list lambda functions with ":function".
* patch 7.4.2142v7.4.2142Bram Moolenaar2016-08-011-41/+59
| | | | | | | Problem: Leaking memory when redefining a function. Solution: Don't increment the function reference count when it's found by name. Don't remove the wrong function from the hashtab. More reference counting fixes.
* patch 7.4.2141v7.4.2141Bram Moolenaar2016-08-011-9/+10
| | | | | | Problem: Coverity reports bogus NULL check. Solution: When checking for a variable in the funccal scope don't pass the varname.
* patch 7.4.2139v7.4.2139Bram Moolenaar2016-08-011-1/+1
| | | | | Problem: :delfunction causes illegal memory access. Solution: Correct logic when deciding to free a function.
* patch 7.4.2137v7.4.2137Bram Moolenaar2016-08-011-174/+172
| | | | | | | Problem: Using function() with a name will find another function when it is redefined. Solution: Add funcref(). Refer to lambda using a partial. Fix several reference counting issues.
* patch 7.4.2136v7.4.2136Bram Moolenaar2016-07-311-50/+55
| | | | | Problem: Closure function fails. Solution: Don't reset uf_scoped when it points to another funccal.
* patch 7.4.2134v7.4.2134Bram Moolenaar2016-07-311-6/+11
| | | | | Problem: No error for using function() badly. Solution: Check for passing wrong function name. (Ken Takata)
* patch 7.4.2120v7.4.2120Bram Moolenaar2016-07-291-4/+67
| | | | | | Problem: User defined functions can't be a closure. Solution: Add the "closure" argument. Allow using :unlet on a bound variable. (Yasuhiro Matsumoto, Ken Takata)