Age | Commit message (Collapse) | Author |
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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)
|
|
Problem: Compiler may warn for uninitialized variable.
Solution: Initialize this_props_len. (Christian Brabandt, closes #12599)
|
|
Problem: Some internal error messages are translated.
Solution: Consistently do not translate internal error messages.
(closes #12459)
|
|
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)
|
|
Problem: Crash when recovering from corrupted swap file.
Solution: Bail out when the line index looks wrong. (closes #12276)
|
|
Problem: Coverity warns for using invalid array index.
Solution: Add entry for Xchacha, even though it is not used.
|
|
Problem: Decrypting with libsodium may fail if the library changes.
Solution: Add parameters used to the encrypted file header. (Christian
Brabandt, closes #12279)
|
|
Problem: Crash when recovering from corrupted swap file.
Solution: Check for a valid page count. (closes #12275)
|
|
Problem: Using sizeof() and subtract array size is tricky.
Solution: Use offsetof() instead. (closes #11926)
|
|
Problem: Code is indented more than necessary.
Solution: Use an early return where it makes sense. (Yegappan Lakshmanan,
closes #11813)
|
|
Problem: unnessary assignment
Solution: Remove the assignment. (Luuk van Baal, closes #1136)
|
|
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.
|
|
Problem: The 'cmdheight' zero support causes too much trouble.
Solution: Revert support for 'cmdheight' being zero.
|
|
Problem: Clearing screen causes flicker.
Solution: Do not clear but redraw in more cases. Add () to "wait_return".
|
|
Problem: When cmdheight is zero the attention prompt doesn't show.
Solution: Do not use the message window for a prompt.
|
|
Problem: Redraw flags are not named specifically.
Solution: Prefix "UPD_" to the flags, for UPDate_screen().
|
|
Problem: Textprop test with line2byte() fails on MS-Windows.
Solution: Fix updating chuncks in ml_delete_int().
|
|
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.
|
|
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.
|
|
Problem: Byte offsets are wrong when using text properties.
Solution: Make sure text properties do not affect the byte counts.
(Paul Ollis, closes #10474)
|
|
Problem: Build error with a certain combination of features.
Solution: Adjust #if. (John Marriott)
|
|
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)
|
|
Problem: Error from setting an option is silently ignored.
Solution: Handle option value errors better. Fix uses of N_().
|
|
Problem: Using "else" after return or break increases indent.
Solution: Remove "else" and reduce indent. (Goc Dundar, closes #10099)
|
|
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)
|
|
Problem: Return type of swapfile_unchanged() is wrong.
Solution: Use "int". (closes #10000 Yeah!)
|
|
Problem: Missing parenthesis may cause unexpected problems.
Solution: Add more parenthesis is macros. (closes #9788)
|
|
Problem: Crash after ml_get error.
Solution: When returning "???" flush the line and set ml_line_lnum.
|
|
Problem: Theoretical computation overflow.
Solution: Perform multiplication in a wider type. (closes #9657)
|
|
Problem: Some type casts are redundant.
Solution: Remove the type casts. (closes #9643)
|
|
Problem: Cannot load libsodium dynamically.
Solution: Support dynamic loading on MS-Windows. (Ken Takata, closes #9554)
|
|
Problem: Error messages are spread out.
Solution: Move more error messages to errors.h.
|
|
Problem: Error messages are spread out.
Solution: Move more error messages to errors.h.
|
|
Problem: Error messages are spread out.
Solution: Move more error messages to errors.h.
|
|
Problem: Error messages are spread out.
Solution: Move more error messages to errors.h.
|
|
Problem: Various spelling mistakes in comments.
Solution: Fix the mistakes. (Dominique Pellé, closes #9416)
|
|
Problem: When ml_get_buf() fails it messes up IObuff.
Solution: Return a local pointer. (closes #9214)
|
|
Problem: Swapname has double slash when 'directory' ends in double slash.
(Shane Smith)
Solution: Remove the superfluous slash. (closes #8876)
|
|
Problem: Changes are only detected with one second accuracy.
Solution: Use the nanosecond time if possible. (Leah Neukirchen,
closes #8873, closes #8875)
|
|
Problem: Superfluous return statements.
Solution: Remove superfluous return statements from void functions.
(closes #8977)
|
|
Problem: #ifdef for using sysinfo() is incomplete.
Solution: Also check for HAVE_SYSINFO. Make autoconf check use TRY_LINK.
(closes #8952)
|
|
Problem: Using uninitialized memory.
Solution: Initialize textprop_save_len.
|
|
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.
|
|
Problem: MS-Windows: compiler warning for 64-32 bit conversion.
Solution: Add type casts.
|