summaryrefslogtreecommitdiffstats
path: root/src/memline.c
AgeCommit message (Collapse)Author
2024-03-13patch 9.1.0177: Coverity reports dead codev9.1.0177zeertzjq
Problem: Coverity reports dead code. Solution: Remove the dead code. Also fix a mistake in ml_get_pos_len() and update some comments (zeertzjq). closes: #14189 Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-12patch 9.1.0172: More code can use ml_get_buf_len() instead of STRLEN()v9.1.0172zeertzjq
Problem: More code can use ml_get_buf_len() instead of STRLEN(). Solution: Change more STRLEN() calls to ml_get_buf_len(). Also do not set ml_line_textlen in ml_replace_len() if "has_props" is set, because "len_arg" also includes the size of text properties in that case. (zeertzjq) closes: #14183 Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-11patch 9.1.0168: too many STRLEN() callsv9.1.0168John Marriott
Problem: too many STRLEN() calls Solution: Make use of ml_get_len() calls instead (John Marriott) closes: #14123 Signed-off-by: John Marriott <basilisk@internode.on.net> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-10patch 9.1.0163: Calling STRLEN() to compute ml_line_textlen when not neededv9.1.0163zeertzjq
Problem: Calling STRLEN() to compute ml_line_textlen when not needed. Solution: Use 0 when STRLEN() will be required and call STRLEN() later. (zeertzjq) closes: #14155 Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-05patch 9.1.0151: ml_get_buf_len() does not consider text propertiesv9.1.0151Christian Brabandt
Problem: ml_get_buf_len() does not consider text properties (zeertzj) Solution: Store text length excluding text properties length in addition in the memline related #14123 closes: #14133 Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-26patch 9.1.0138: too many STRLEN calls when getting a memlinev9.1.0138John Marriott
Problem: too many STRLEN calls when getting a memline Solution: Optimize calls to STRLEN(), add a few functions in memline.c that return the byte length instead of relying on STRLEN() (John Marriott) closes: #14052 Signed-off-by: John Marriott <basilisk@internode.on.net> Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-06-27patch 9.0.1669: Crash syncing swapfile in new buffer when using sodium cryptv9.0.1669Christian Brabandt
Problem: Crash syncing swapfile in new buffer when using sodium crypt. (James McCoy) Solution: Add checks for sodium encryption. (Christian Brabandt, closes #12591, closes #12585)
2023-06-26patch 9.0.1666: compiler may warn for uninitialized variablev9.0.1666Christian Brabandt
Problem: Compiler may warn for uninitialized variable. Solution: Initialize this_props_len. (Christian Brabandt, closes #12599)
2023-05-31patch 9.0.1594: some internal error messages are translatedv9.0.1594RestorerZ
Problem: Some internal error messages are translated. Solution: Consistently do not translate internal error messages. (closes #12459)
2023-05-27patch 9.0.1583: get E304 when using 'cryptmethod' "xchacha20v2"v9.0.1583Bram Moolenaar
Problem: Get E304 when using 'cryptmethod' "xchacha20v2". (Steve Mynott) Solution: Add 4th crypt method to block zero ID check. Avoid syncing a swap file before reading the file. (closes #12433)
2023-04-27patch 9.0.1494: crash when recovering from corrupted swap filev9.0.1494Bram Moolenaar
Problem: Crash when recovering from corrupted swap file. Solution: Bail out when the line index looks wrong. (closes #12276)
2023-04-24patch 9.0.1484: Coverity warns for using invalid array indexv9.0.1484Bram Moolenaar
Problem: Coverity warns for using invalid array index. Solution: Add entry for Xchacha, even though it is not used.
2023-04-23patch 9.0.1481: decrypting with libsodium may fail if the library changesv9.0.1481Christian Brabandt
Problem: Decrypting with libsodium may fail if the library changes. Solution: Add parameters used to the encrypted file header. (Christian Brabandt, closes #12279)
2023-04-22patch 9.0.1477: crash when recovering from corrupted swap filev9.0.1477Bram Moolenaar
Problem: Crash when recovering from corrupted swap file. Solution: Check for a valid page count. (closes #12275)
2023-02-01patch 9.0.1271: using sizeof() and subtract array size is trickyv9.0.1271zeertzjq
Problem: Using sizeof() and subtract array size is tricky. Solution: Use offsetof() instead. (closes #11926)
2023-01-14patch 9.0.1196: code is indented more than necessaryv9.0.1196Yegappan Lakshmanan
Problem: Code is indented more than necessary. Solution: Use an early return where it makes sense. (Yegappan Lakshmanan, closes #11813)
2022-12-23patch 9.0.1089: unnessary assignmentv9.0.1089Luuk van Baal
Problem: unnessary assignment Solution: Remove the assignment. (Luuk van Baal, closes #1136)
2022-12-05patch 9.0.1007: there is no way to get a list of swap file namesv9.0.1007Bram Moolenaar
Problem: There is no way to get a list of swap file names. Solution: Add the swapfilelist() function. Use it in the test script to clean up. Remove deleting individual swap files.
2022-08-31patch 9.0.0340: the 'cmdheight' zero support causes too much troublev9.0.0340Bram Moolenaar
Problem: The 'cmdheight' zero support causes too much trouble. Solution: Revert support for 'cmdheight' being zero.
2022-08-29patch 9.0.0318: clearing screen causes flickerv9.0.0318Bram Moolenaar
Problem: Clearing screen causes flicker. Solution: Do not clear but redraw in more cases. Add () to "wait_return".
2022-08-28patch 9.0.0308: when cmdheight is zero the attention prompt doesn't showv9.0.0308Bram Moolenaar
Problem: When cmdheight is zero the attention prompt doesn't show. Solution: Do not use the message window for a prompt.
2022-08-14patch 9.0.0206: redraw flags are not named specificallyv9.0.0206Bram Moolenaar
Problem: Redraw flags are not named specifically. Solution: Prefix "UPD_" to the flags, for UPDate_screen().
2022-08-09patch 9.0.0181: textprop test with line2byte() fails on MS-Windowsv9.0.0181Bram Moolenaar
Problem: Textprop test with line2byte() fails on MS-Windows. Solution: Fix updating chuncks in ml_delete_int().
2022-08-07patch 9.0.0166: when using text properties line text length computed twicev9.0.0166Bram Moolenaar
Problem: When using text properties the line text length is computed twice. Solution: If the text lenght was already computed don't do it again.
2022-06-30patch 9.0.0013: reproducing memory access errors can be difficultv9.0.0013Bram Moolenaar
Problem: Reproducing memory access errors can be difficult. Solution: When testing, copy each line to allocated memory, so that valgrind can detect accessing memory before and/or after it. Fix uncovered problems.
2022-05-24patch 8.2.5014: byte offsets are wrong when using text propertiesv8.2.5014Paul Ollis
Problem: Byte offsets are wrong when using text properties. Solution: Make sure text properties do not affect the byte counts. (Paul Ollis, closes #10474)
2022-05-16patch 8.2.4961: build error with a certain combination of featuresv8.2.4961Bram Moolenaar
Problem: Build error with a certain combination of features. Solution: Adjust #if. (John Marriott)
2022-05-15patch 8.2.4960: text properties that cross lines not updated for deleted linev8.2.4960Paul Ollis
Problem: Text properties that cross line boundary are not correctly updated for a deleted line. Solution: Correct computing location of text property entry. (Paul Ollis, closes #10431, closes #10430)
2022-04-15patch 8.2.4753: error from setting an option is silently ignoredv8.2.4753Bram Moolenaar
Problem: Error from setting an option is silently ignored. Solution: Handle option value errors better. Fix uses of N_().
2022-04-07patch 8.2.4704: using "else" after return or break increases indentv8.2.4704=?UTF-8?q?Dundar=20G=C3=B6c?=
Problem: Using "else" after return or break increases indent. Solution: Remove "else" and reduce indent. (Goc Dundar, closes #10099)
2022-04-04patch 8.2.4685: when a swap file is found for a popup there is no dialogv8.2.4685Bram Moolenaar
Problem: When a swap file is found for a popup there is no dialog and the buffer is loaded anyway. Solution: Silently load the buffer read-only. (closes #10073)
2022-03-23patch 8.2.4613: return type of swapfile_unchanged() is wrongv8.2.4613zeertzjq
Problem: Return type of swapfile_unchanged() is wrong. Solution: Use "int". (closes #10000 Yeah!)
2022-02-16patch 8.2.4402: missing parenthesis may cause unexpected problemsv8.2.4402kylo252
Problem: Missing parenthesis may cause unexpected problems. Solution: Add more parenthesis is macros. (closes #9788)
2022-02-16patch 8.2.4399: crash after ml_get errorv8.2.4399Bram Moolenaar
Problem: Crash after ml_get error. Solution: When returning "???" flush the line and set ml_line_lnum.
2022-01-29patch 8.2.4255: theoretical computation overflowv8.2.4255=?UTF-8?q?Dundar=20G=C3=B6c?=
Problem: Theoretical computation overflow. Solution: Perform multiplication in a wider type. (closes #9657)
2022-01-28patch 8.2.4241: some type casts are redundantv8.2.4241=?UTF-8?q?Dundar=20G=C3=B6c?=
Problem: Some type casts are redundant. Solution: Remove the type casts. (closes #9643)
2022-01-19patch 8.2.4144: cannot load libsodium dynamicallyv8.2.4144K.Takata
Problem: Cannot load libsodium dynamically. Solution: Support dynamic loading on MS-Windows. (Ken Takata, closes #9554)
2022-01-05patch 8.2.4010: error messages are spread outv8.2.4010Bram Moolenaar
Problem: Error messages are spread out. Solution: Move more error messages to errors.h.
2022-01-05patch 8.2.4008: error messages are spread outv8.2.4008Bram Moolenaar
Problem: Error messages are spread out. Solution: Move more error messages to errors.h.
2022-01-02patch 8.2.3983: error messages are spread outv8.2.3983Bram Moolenaar
Problem: Error messages are spread out. Solution: Move more error messages to errors.h.
2022-01-01patch 8.2.3977: error messages are spread outv8.2.3977Bram Moolenaar
Problem: Error messages are spread out. Solution: Move more error messages to errors.h.
2021-12-27patch 8.2.3914: various spelling mistakes in commentsv8.2.3914Dominique Pelle
Problem: Various spelling mistakes in comments. Solution: Fix the mistakes. (Dominique Pellé, closes #9416)
2021-11-25patch 8.2.3674: when ml_get_buf() fails it messes up IObuffv8.2.3674Bram Moolenaar
Problem: When ml_get_buf() fails it messes up IObuff. Solution: Return a local pointer. (closes #9214)
2021-10-19patch 8.2.3543: swapname has double slash when 'directory' ends in itv8.2.3543Bram Moolenaar
Problem: Swapname has double slash when 'directory' ends in double slash. (Shane Smith) Solution: Remove the superfluous slash. (closes #8876)
2021-10-14patch 8.2.3510: changes are only detected with one second accuracyv8.2.3510Leah Neukirchen
Problem: Changes are only detected with one second accuracy. Solution: Use the nanosecond time if possible. (Leah Neukirchen, closes #8873, closes #8875)
2021-10-09patch 8.2.3490: superfluous return statementsv8.2.3490=?UTF-8?q?Dundar=20G=C3=B6c?=
Problem: Superfluous return statements. Solution: Remove superfluous return statements from void functions. (closes #8977)
2021-10-06patch 8.2.3483: #ifdef for using sysinfo() is incompletev8.2.3483Bram Moolenaar
Problem: #ifdef for using sysinfo() is incomplete. Solution: Also check for HAVE_SYSINFO. Make autoconf check use TRY_LINK. (closes #8952)
2021-08-25patch 8.2.3375: using uninitialized memoryv8.2.3375Bram Moolenaar
Problem: Using uninitialized memory. Solution: Initialize textprop_save_len.
2021-08-25patch 8.2.3372: line2byte() value wrong when adding a text propertyv8.2.3372Bram Moolenaar
Problem: line2byte() value wrong when adding a text property. (Yuto Kimura) Solution: Adjust length for text property. (closes #8772) Also fix it for deleting a line.
2021-08-16patch 8.2.3355: MS-Windows: compiler warning for 64-32 bit conversionv8.2.3355Bram Moolenaar
Problem: MS-Windows: compiler warning for 64-32 bit conversion. Solution: Add type casts.