Problem: Support for 'smoothscroll' in (half-)page scrolling
broke backward compatibility and can be made to work better.
(after v9.1.215)
Solution: Restore the previous cursor and end-of-buffer behavior for
half-page scrolling and improve 'smoothscroll' support.
(Luuk van Baal)
fixes: #14338closes: #14377
Signed-off-by: Luuk van Baal <luukvbaal@gmail.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 #14123closes: #14133
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: When undoing with 'spell', redrawWinline() is called after
changed_lines(), while later win_update() sets redraw type to
UPD_NOT_VALID, even though w_redraw_top and w_redraw_bot are
still valid.
Solution: Only set redraw type to UPD_NOT_VALID when inserting/deleting
lines after parts of window has pending redraw, i.e., when
changed_lines() is called after redrawWinline().
(zeertzjq)
closes: #14019
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Redrawing can be improved when deleting lines with 'cursorline'.
Solution: Use smarter invalidation and adjustment. Remove unnecessary
UPD_VALID as it is already set at the top of the loop. Make
the test for #4862 fail without the fix.
(zeertzjq)
closes: #13986
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Position of marker for 'smoothscroll' not computed correctly.
Solution: Take 'list' and other options into account. (Luuk van Baal,
closes#12393)
Problem: Display errors when making topline shorter and 'smoothscroll' is
set.
Solution: Reset w_skipcol when the topline becomes shorter than its current
value. (Luuk van Baal, closes#12367)
Problem: Adding a line below the last one does not expand fold.
Solution: Do not skip mark_adjust() when adding lines below the last one.
(Brandon Simmons, closes#11832, closes#10698)
Problem: Callback name argument is changed by setqflist().
Solution: Use the expanded function name for the callback, do not store it
in the argument. (closes#11653)
Problem: With spell checking, deleting a full stop at the end of a line
does not update SpellCap at the start of the next line.
Solution: Update the next line when characters have been deleted. Also when
using undo.
Problem: Removing a listener may result in a memory leak and remove
subsequent listerns.
Solution: Init the "prev" pointer only once. (Yegappan Lakshmanan,
closes#11039)
Problem: Mechanism to prevent recursive screen updating is incomplete.
Solution: Add "redraw_not_allowed" and set it in build_stl_str_hl().
(issue #10952)
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: smart/C/lisp indenting is optional, which makes the code more
complex, while it only reduces the executable size a bit.
Solution: Graduate FEAT_CINDENT, FEAT_SMARTINDENT and FEAT_LISP.
Problem: Text properties are wrong after "cc". (Axel Forsman)
Solution: Pass the deleted byte count to inserted_bytes(). (closes#10412,
closes#7737, closes#5763)
Problem: Some users do not want a line comment always inserted.
Solution: Add the '/' flag to 'formatoptions' to not repeat the comment
leader after a statement when using "o".
Problem: No proper formatting of a C line comment after a statement.
Solution: Find the start of the line comment, insert the comment leader and
indent the comment properly.