Age | Commit message (Collapse) | Author |
|
Problem: Cursor position wrong when clicking with conceal and wrap.
Solution: Use the virtual column of the last char for ScreenCols[] in
boguscols. Remove use of MAXCOL in ScreenCols[]. Rename
third argument of wlv_screen_line() to "clear_end" as that's
clearer what it does (zeertzjq).
related: 14192
closes: #14200
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: infinite loop in win_update with 'smoothscroll' set when
window width is equal to textoff, or signed integer overflow
if smaller.
Solution: don't revalidate wp->w_skipcol in that case, as no buffer text
is being shown. (Sean Dewar)
Don't instead reset w_skipcol; that would lose the scroll position
within the line, which may be undesirable if the window is made wider
later.
Also include changes from the splitmove PR #14042 that I (in my infinite
Git wisdom) forgot to commit. This includes a change to
Test_window_split_no_room to ensure it doesn't fail for some screen
sizes.
Move Test_smoothscroll_in_zero_width_window to test_scroll_opt.vim, as
that file feels more appropriate.
closes: #14068
Signed-off-by: Sean Dewar <6256228+seandewar@users.noreply.github.com>
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 inserting/deleting lines with 'number'.
Solution: Only redraw the number column of lines below changed lines.
Add a test as this wasn't previously tested.
(zeertzjq)
closes: #13985
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
Problem: LineNrAbove and LineNrBelow background wrong on wrapped lines.
Solution: Update number column also for wrapped part of a line.
(zeertzjq)
closes: #13974
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
Problem: Things that temporarily change/restore curwin/buf (e.g:
win_execute, some autocmds) may break assumptions that
curwin/buf is the cmdwin when "cmdwin_type != 0", causing
issues.
Solution: Expose the cmdwin's real win/buf and check that instead. Also
try to ensure these variables are NULL if "cmdwin_type == 0",
allowing them to be used directly in most cases without
checking cmdwin_type. (Sean Dewar)
Alternatively, we could ban win_execute in the cmdwin and audit all places that
temporarily change/restore curwin/buf, but I didn't notice any problems arising
from allowing this (standard cmdwin restrictions still apply, so things that may
actually break the cmdwin are still forbidden).
closes: #12819
Signed-off-by: Sean Dewar <seandewar@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
Problem: screenpos() may cause unnecessary redraw.
Solution: Don't unnecessarily reset VALID_WROW flag.
VALID_WROW flag is only used by two functions: validate_cursor() and
cursor_valid(), and cursor_valid() is only used once in ex_sleep().
When adjust_plines_for_skipcol() was first added in patch 9.0.0640, it
was called in two functions: comp_botline() and curs_rows().
- comp_botline() is called in two places:
- onepage(), which resets VALID_WROW flag immediately afterwards.
- validate_botline_win(), where resetting a VALID_ flag is strange.
- curs_rows() is called in two places:
- curs_columns(), which sets VALID_WROW flag afterwards.
- validate_cline_row(), which is only used by GUI mouse focus.
Therefore resetting VALID_WROW there doesn't seem to do anything useful.
Also, a w_skipcol check (which resets VALID_WROW flag) was added to
check_cursor_moved() in patch 9.0.0734, which seems to make more sense
than resetting that flag in the middle of a computation.
While at it make adjust_plines_for_skipcol() and textpos2screenpos() a
bit less confusing:
- Make adjust_plines_for_skipcol() return "off" instead of "n - off".
- Use 0-based "row" in textpos2screenpos() until W_WINROW is added.
closes: #12832
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
|
|
Problem: screenpos() wrong result with w_skipcol and cpoptions+=n
Solution: Use adjust_plines_for_skipcol() instead of subtracting
w_skipcol.
closes: #12625
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
|
|
Problem: Line pointer becomes invalid when using spell checking.
Solution: Call ml_get() at the right places. (Luuk van Baal, closes #12456)
|
|
Problem: Weird use of static variables for spell checking.
Solution: Move the variables to a structure and pass them from win_update()
to win_line(). (Luuk van Baal, closes #12448)
|
|
Problem: SpellCap highlight not always updated when needed.
Solution: Handle updating line below closed fold and other situations where
only part of the window is redrawn. (Luuk van Baal, closes #12428,
closes #12420)
|
|
Problem: Inserting lines when scrolling with 'smoothscroll' set.
Solution: Adjust line height computation for w_skipcol. (Luuk van Baal,
closes #12350)
|
|
Problem: Cannot display 'showcmd' somewhere else.
Solution: Add the 'showcmdloc' option. (Luuk van Baal, closes #11684)
|
|
Problem: Build failure on some systems.
Solution: Adjust #ifdefs related to the termresponse feature.
|
|
Problem: Handling 'statusline' errors is spread out.
Solution: Pass the option name to the lower levels so the option can be
reset there when an error is encountered. (Luuk van Baal,
closes #11467)
|
|
Problem: Crash when popup closed in callback. (Maxim Kim)
Solution: In syntax_end_parsing() check that syn_block is valid.
|
|
Problem: Too many #ifdefs.
Solution: Gradudate the +cmdline_info feature. (Martin Tournoij,
closes #11330)
|
|
Problem: Multi-byte "lastline" item in 'fillchars' does not work properly
when the window is two columns wide.
Solution: Compute the text length correctly. (closes #11280)
|
|
Problem: Too many #ifdefs.
Solution: Graduate the +cmdwin feature. Now the tiny and small builds are
equal, drop the small build. (Martin Tournoij, closes #11268)
|
|
Problem: Cannot specify another character to use instead of '@' at the end
of the window.
Solution: Add "lastline" to 'fillchars'. (Martin Tournoij, closes #11264,
closes #10963)
|
|
Problem: 'smoothscroll' not tested with 'number' and "n" in 'cpo'.
Solution: Add tests, fix uncovered problem.
|
|
Problem: matchaddpos() can only add up to 8 matches.
Solution: Allocate the array of positions. (closes #11248)
|
|
Problem: The 'cmdheight' zero support causes too much trouble.
Solution: Revert support for 'cmdheight' being zero.
|
|
Problem: Flicker when resetting cmdline_row after updating the screen.
Solution: Do not update cmdline_row. (issue #11017)
|
|
Problem: Clearing screen causes flicker.
Solution: Do not clear but redraw in more cases. Add () to "wait_return".
|
|
Problem: When updating the whole screen a popup may not be redrawn.
Solution: Mark the screen and windows for redraw also when not clearing.
Also mark popup windows for redraw.
|
|
Problem: Screen flickers when 'cmdheight' is zero.
Solution: Redraw over existing text instead of clearing.
|
|
Problem: Test for hit-Enter prompt fails.
Solution: Only reset cmdline_row when 'cmdheight' is zero.
|
|
Problem: Invalid memory access when cmdheight is zero.
Solution: Check index in w_lines is smaller than Rows.
|
|
Problem: The tiny version has the popup menu but not 'wildmenu'.
Solution: Graduate the wildmenu feature.
|
|
Problem: Too many #ifdefs.
Solution: Make some functions always available.
|
|
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: Redraw flags are not named specifically.
Solution: Prefix "UPD_" to the flags, for UPDate_screen().
|
|
Problem: Possible invalid memory access when 'cmdheight' is zero. (Martin
Tournoij)
Solution: Avoid going over the end of w_lines[] when w_height is Rows.
(closes #10882)
|
|
Problem: The command line takes up space even when not used.
Solution: Allow for 'cmdheight' to be set to zero. (Shougo Matsushita,
closes #10675, closes #940)
|
|
Problem: 'fillchars' cannot have window-local values.
Solution: Make 'fillchars' global-local. (closes #5206)
|
|
Problem: Syntax highlighting disabled when using synID() in searchpair()
skip expression and it times out. (Jaehwang Jung)
Solution: Add the redrawtime_limit_set flag. (closes #10562)
|
|
Problem: Using gettimeofday() for timeout is very inefficient.
Solution: Set a platform dependent timer. (Paul Ollis, closes #10505)
|
|
Problem: CurSearch highlight is often wrong.
Solution: Remember the last highlighted position and redraw when needed.
|
|
Problem: The mode #defines are not clearly named.
Solution: Prepend MODE_. Renumber them to put the mapped modes first.
|
|
Problem: @@@ in the last line sometimes drawn in the wrong place.
Solution: Make sure the column is valid. (closes #10130)
|
|
Problem: Redrawing too often when 'relativenumber' is set.
Solution: Only redraw when the cursor line changed. (Lewis Russell,
closes #10040)
|
|
Problem: Superfluous check if a redraw is needed for 'cursorline'.
Solution: Remove check_redraw_cursorline(). (closes #10030, closes #10029)
|
|
Problem: Visual area not fully updated when removing sign in Visual mode
while scrolling.
Solution: Adjust check for topline. (closes #10017)
|
|
Problem: Redrawing too much when 'cursorline' is set and jumping around.
Solution: Rely on win_update() to redraw the current and previous cursor
line, do not mark lines as modified. (closes #9996)
|
|
Problem: Some conditions are always true.
Solution: Remove the useless conditions. (closes #9993)
|
|
Problem: Cursor line not updated when a callback moves the cursor.
Solution: Check if the cursor moved. (closes #9970)
|
|
Problem: Missing parenthesis may cause unexpected problems.
Solution: Add more parenthesis is macros. (closes #9788)
|
|
Problem: A custom 'tabline' may cause Esc to work like Enter on the
command line when the popup menu is displayed.
Solution: Save and restore KeyTyped. (closes #9776)
|