summaryrefslogtreecommitdiff
path: root/src/memline.c
Commit message (Collapse)AuthorAgeFilesLines
* patch 8.1.1711: listener callback called at the wrong momentv8.1.1711Bram Moolenaar2019-07-171-8/+9
| | | | | Problem: Listener callback called at the wrong moment Solution: Invoke listeners before calling ml_delete_int(). (closes #4657)
* patch 8.1.1700: listener callback called for the wrong bufferv8.1.1700Bram Moolenaar2019-07-151-59/+73
| | | | | Problem: Listener callback called for the wrong buffer. Solution: Invoke listeners before calling ml_append_int().
* patch 8.1.1681: insert stray "{" when listener gets buffer linev8.1.1681Bram Moolenaar2019-07-131-1/+3
| | | | | Problem: Insert stray "{" when listener gets buffer line. (Paul Jolly) Solution: Flush the cached line after invoking listeners. (closes #4455)
* patch 8.1.1567: localtime_r() does not respond to $TZ changesv8.1.1567Bram Moolenaar2019-06-181-7/+43
| | | | | Problem: Localtime_r() does not respond to $TZ changes. Solution: If $TZ changes then call tzset(). (Tom Ryder)
* patch 8.1.1498: ":write" increments b:changedtick even though nothing changedv8.1.1498Bram Moolenaar2019-06-081-1/+1
| | | | | | Problem: ":write" increments b:changedtick even though nothing changed. (Daniel Hahler) Solution: Only increment b:changedtick if the modified flag is reset.
* patch 8.1.1414: alloc() returning "char_u *" causes a lot of type castsv8.1.1414Bram Moolenaar2019-05-281-8/+6
| | | | | | Problem: Alloc() returning "char_u *" causes a lot of type casts. Solution: Have it return "void *". (Mike Williams) Define ALLOC_ONE() to check the simple allocations.
* patch 8.1.1395: saving for undo may access invalid memoryv8.1.1395Bram Moolenaar2019-05-251-2/+6
| | | | | Problem: Saving for undo may access invalid memory. (Dominique Pelle) Solution: Set ml_line_len also when returning a constant string.
* patch 8.1.1384: using "int" for alloc() often results in compiler warningsv8.1.1384Bram Moolenaar2019-05-241-11/+11
| | | | | | Problem: Using "int" for alloc() often results in compiler warnings. Solution: Use "size_t" and remove type casts. Remove alloc_check(), Vim only works with 32 bit ints anyway.
* patch 8.1.1371: cannot recover from a swap filev8.1.1371Bram Moolenaar2019-05-231-7/+11
| | | | | | | Problem: Cannot recover from a swap file. Solution: Do not expand environment variables in the swap file name. Do not check the extension when we already know a file is a swap file. (Ken Takata, closes 4415, closes #4369)
* patch 8.1.1344: Coverity complains about possibly using a NULL pointerv8.1.1344Bram Moolenaar2019-05-181-3/+4
| | | | | | | Problem: Coverity complains about possibly using a NULL pointer and copying a string into a fixed size buffer. Solution: Check for NULL, even though it should not happen. Use vim_strncpy() instead of strcpy().
* patch 8.1.1335: listener callback is called after inserting textv8.1.1335Bram Moolenaar2019-05-161-0/+11
| | | | | | Problem: Listener callback is called after inserting text. Solution: Flush the changes before inserting or deleting a line. Store changes per buffer.
* patch 8.1.1318: code for text changes is in a "misc" filev8.1.1318Bram Moolenaar2019-05-111-2/+2
| | | | | Problem: Code for text changes is in a "misc" file. Solution: Move the code to change.c.
* patch 8.1.1313: warnings for using localtime() and ctime()v8.1.1313Bram Moolenaar2019-05-101-21/+45
| | | | | Problem: Warnings for using localtime() and ctime(). Solution: Use localtime_r() if available. Avoid using ctime().
* patch 8.1.1232: can't build on MS-Windowsv8.1.1232Bram Moolenaar2019-04-281-8/+10
| | | | | Problem: Can't build on MS-Windows. Solution: Define process_still_running.
* patch 8.1.1231: asking about existing swap file unnecessarilyv8.1.1231Bram Moolenaar2019-04-281-8/+67
| | | | | | Problem: Asking about existing swap file unnecessarily. Solution: When it is safe, delete the swap file. Remove HAS_SWAP_EXISTS_ACTION, it is always defined. (closes #1237)
* patch 8.1.1230: a lot of code is shared between vim.exe and gvim.exev8.1.1230Bram Moolenaar2019-04-281-1/+1
| | | | | | Problem: A lot of code is shared between vim.exe and gvim.exe. Solution: Optionally put the shared code in vim.dll. (Ken Takata, closes #4287)
* patch 8.1.1086: too many curly bracesv8.1.1086Bram Moolenaar2019-03-301-4/+0
| | | | | | Problem: Too many curly braces. Solution: Remove curly braces where they are not needed. (Hirohito Higashi, closes #3982)
* patch 8.1.0941: macros for MS-Windows are inconsistentv8.1.0941Bram Moolenaar2019-02-171-11/+11
| | | | | | | Problem: Macros for MS-Windows are inconsistent, using "32", "3264 and others. Solution: Use MSWIN for all MS-Windows builds. Use FEAT_GUI_MSWIN for the GUI build. (Hirohito Higashi, closes #3932)
* 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.0806: too many #ifdefsv8.1.0806Bram Moolenaar2019-01-241-12/+2
| | | | | Problem: Too many #ifdefs. Solution: Graduate FEAT_MBYTE, part 2.
* patch 8.1.0779: argument for message functions is inconsistentv8.1.0779Bram Moolenaar2019-01-191-69/+69
| | | | | 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.0688: text properties are not restored by undov8.1.0688Bram Moolenaar2019-01-041-12/+36
| | | | | Problem: Text properties are not restored by undo. Solution: Also save text properties for undo.
* patch 8.1.0684: warnings from 64-bit compilerv8.1.0684Bram Moolenaar2019-01-031-5/+5
| | | | | Problem: Warnings from 64-bit compiler. Solution: Add type casts. (Mike Williams)
* patch 8.1.0655: when appending a line text property flags are not addedv8.1.0655Bram Moolenaar2018-12-281-23/+99
| | | | | Problem: When appending a line text property flags are not added. Solution: Add text properties to a newly added line.
* patch 8.1.0654: when deleting a line text property flags are not adjustedv8.1.0654Bram Moolenaar2018-12-281-9/+141
| | | | | Problem: When deleting a line text property flags are not adjusted. Solution: Adjust text property flags in preceding and following lines.
* patch 8.1.0643: computing byte offset wrongv8.1.0643Bram Moolenaar2018-12-261-1/+1
| | | | | Problem: Computing byte offset wrong. (Bjorn Linse) Solution: Use the right variable for array index.
* patch 8.1.0642: swapinfo() leaks memoryv8.1.0642Bram Moolenaar2018-12-261-14/+8
| | | | | Problem: swapinfo() leaks memory. Solution: Avoid allocating the strings twice.
* patch 8.1.0636: line2byte() gives wrong values with text propertiesv8.1.0636Bram Moolenaar2018-12-251-11/+41
| | | | | | Problem: line2byte() gives wrong values with text properties. (Bjorn Linse) Solution: Compute byte offsets differently when text properties were added. (closes #3718)
* patch 8.1.0601: a few compiler warningsv8.1.0601Bram Moolenaar2018-12-161-3/+3
| | | | | Problem: A few compiler warnings. Solution: Add type casts. (Mike Williams)
* patch 8.1.0581: double free without the text properties featurev8.1.0581Bram Moolenaar2018-12-131-1/+1
| | | | | Problem: Double free without the text properties feature. Solution: Reset the dirty flag.
* patch 8.1.0579: cannot attach properties to textv8.1.0579Bram Moolenaar2018-12-131-21/+85
| | | | | Problem: Cannot attach properties to text. Solution: First part of adding text properties.
* patch 8.1.0501: cppcheck warns for using array index before bounds checkv8.1.0501Bram Moolenaar2018-10-301-2/+2
| | | | | Problem: Cppcheck warns for using array index before bounds check. Solution: Swap the conditions. (Dominique Pelle)
* patch 8.1.0473: user doesn't notice file does not exist when swap file doesv8.1.0473Bram Moolenaar2018-10-131-2/+6
| | | | | | Problem: User doesn't notice file does not exist when swap file does. Solution: Add a note that the file cannot be found. Make the "still running" notice stand out.
* patch 8.1.0466: autocmd test failsv8.1.0466Bram Moolenaar2018-10-071-1/+1
| | | | | Problem: Autocmd test fails. Solution: Do call inchar() when flushing typeahead.
* patch 8.1.0463: "simalt ~x" in .vimrc blocks swap file promptv8.1.0463Bram Moolenaar2018-10-071-7/+11
| | | | | | Problem: "simalt ~x" in .vimrc blocks swap file prompt. Solution: Flush buffers before prompting. (Yasuhiro Matsumoto, closes #3518, closes #2192)
* patch 8.1.0443: unnecessary static function prototypesv8.1.0443Bram Moolenaar2018-09-301-4/+0
| | | | | Problem: Unnecessary static function prototypes. Solution: Remove unnecessary prototypes.
* patch 8.1.0325: strings in swap file may not be NUL terminatedv8.1.0325Bram Moolenaar2018-08-231-4/+7
| | | | | Problem: Strings in swap file may not be NUL terminated. (Coverity) Solution: Limit the length of the used string.
* patch 8.1.0314: build failure without the +eval featurev8.1.0314Bram Moolenaar2018-08-211-6/+10
| | | | | Problem: Build failure without the +eval feature. (Brenton Horne) Solution: Add #ifdef. Also add the "dirty" item.
* patch 8.1.0313: information about a swap file is unavailablev8.1.0313Bram Moolenaar2018-08-211-0/+43
| | | | | Problem: Information about a swap file is unavailable. Solution: Add swapinfo(). (Enzo Ferber)
* patch 8.1.0310: file info msg not always suppressed with 'F' in 'shortmess'v8.1.0310Bram Moolenaar2018-08-211-1/+4
| | | | | | Problem: File info message not always suppressed with 'F' in 'shortmess'. (Asheq Imran) Solution: Save and restore msg_silent. (Christian Brabandt, closes #3221)
* patch 8.1.0303: line2byte() is wrong for last line with 'noeol'v8.1.0303Bram Moolenaar2018-08-201-1/+1
| | | | | Problem: line2byte() is wrong for last line with 'noeol' and 'nofixeol'. Solution: Fix off-by-one error. (Shane Harper, closes #3351)
* patch 8.1.0251: using full path is not supported for 'backupdir'v8.1.0251Bram Moolenaar2018-08-071-10/+5
| | | | | | Problem: Using a full path is supported for 'directory' but not for 'backupdir'. (Mikolaj Machowski) Solution: Support 'backupdir' as well. (Christian Brabandt, closes #179)
* patch 8.1.0023: gcc 8.1 warns for use of strncpy()v8.1.0023Bram Moolenaar2018-05-261-1/+1
| | | | | Problem: gcc 8.1 warns for use of strncpy(). (John Marriott) Solution: Use mch_memmove() instead of STRNCPY().
* patch 8.0.1819: swap file warning for file with non-existing directoryv8.0.1819Bram Moolenaar2018-05-121-5/+6
| | | | | | Problem: Swap file warning for a file in a non-existing directory, if there is another with the same file name. (Juergen Weigert) Solution: When expanding the file name fails compare the file names.
* patch 8.0.1688: some macros are used without a semicolonv8.0.1688Bram Moolenaar2018-04-101-2/+2
| | | | | | Problem: Some macros are used without a semicolon, causing auto-indent to be wrong. Solution: Use the do-while(0) trick. (Ozaki Kiichi, closes #2729)
* patch 8.0.1564: too many #ifdefsv8.0.1564Bram Moolenaar2018-03-041-4/+2
| | | | | | 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.1496: clearing a pointer takes two linesv8.0.1496Bram Moolenaar2018-02-101-8/+4
| | | | | | Problem: Clearing a pointer takes two lines. Solution: Add VIM_CLEAR() and replace vim_clear(). (Hirohito Higashi, closes #2629)
* patch 8.0.1363: recovering does not work when swap file ends in .stzv8.0.1363Bram Moolenaar2017-12-021-2/+3
| | | | | | Problem: Recovering does not work when swap file ends in .stz. Solution: Check for all possible swap file names. (Elfling, closes #2395, closes #2396)
* patch 8.0.1118: FEAT_WINDOWS adds a lot of #ifdefsv8.0.1118Bram Moolenaar2017-09-161-3/+3
| | | | | | Problem: FEAT_WINDOWS adds a lot of #ifdefs while it is nearly always enabled and only adds 7% to the binary size of the tiny build. Solution: Graduate FEAT_WINDOWS.