Age | Commit message (Collapse) | Author |
|
Problem: `gM` would include outer virtual text and its padding when
getting the line length used to calculate the middle of the
line, putting the cursor much closer to virtual text lines.
Solution: Exclude outer virtual text in getting the line length for
`gM`, so that virtual text doesn't influence where the cursor
is moved to (Dylan Thacker-Smith).
closes: #14262
Signed-off-by: Dylan Thacker-Smith <dylan.ah.smith@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
Problem: `gj`/`gk` was updating the desired cursor virtual column to
the outer virtual text, even though the actual cursor position
was moved to not be on the virtual text, leading the need to
do an extra `gj`/`gk` to move past each virtual text line.
(rickhowe)
Solution: Exclude the outer virtual text when getting the line length
for moving the cursor with `gj`/`gk`, so that no extra
movement is needed to skip over virtual text lines.
(Dylan Thacker-Smith)
fixes: #12028
related: #14262
Signed-off-by: Dylan Thacker-Smith <dylan.ah.smith@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
Problem: Memory leak with "above" virtual text and 'relativenumber'.
Solution: Free "text_props" and "text_prop_idxs" before returning.
Also fix off-by-one error causing line number to be drawn
beyond end of window (zeertzjq).
fixes: #14239
closes: #14241
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
'nowrap'
Problem: 'wincolor' highlight missing with 'rightleft', "below" virtual
text and 'nowrap'.
Solution: Handle 'rightleft' in draw_screen_line() (zeertzjq).
closes: #14216
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
Problem: 'wincolor' highlight missing with "below" virtual text.
Solution: Subtract n_attr_skip from n_attr. Combine 'wincolor' with
other highlights when 'nowrap' is set. (zeertzjq)
closes: #14196
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
Problem: Text properties corrupted with fo+=aw and backspace
Solution: Allocate line and move text properties
(zeertzjq)
closes: #14147
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
EOL is shown
Problem: The cursor screen row was incorrectly being calculated when the
cursor follows a 1 character text_align 'below' virtual text line,
resulting in the cursor being shown on the wrong line.
This was caused by a cell size of 2 instead of 1 being used for the EOL
character, which propagated to the calculation of space for putting the
'below' virtual text on its own line. (rickhowe)
Solution: Fix the size used for the EOL character in calculating the
cursor's screen position (Dylan Thacker-Smith)
fixes: #11959
related: #12028
closes: #14096
Signed-off-by: Dylan Thacker-Smith <dylan.ah.smith@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
overlap
Problem: Virtual text with text_align 'right'/'below' wasn't being
used when a non-virtual text property overlaps with the end of
the line. This was because the non-virtual text property had a
higher priority, preventing the virtual text from being used.
Solution: Fix the sorting of text properties so virtual text properties
have a higher priority than non-virtual text properties.
(Dylan Thacker-Smith)
related: #14063
Signed-off-by: Dylan Thacker-Smith <dylan.ah.smith@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
Problem: text-property without type errors when joining
Solution: count all text-properties, with or without type
before joining lines
Error when joining lines with text properties without a proper type
When joining lines, we need to consider all text properties that are
attached to a line, even when those text properties are invalid and do
not have a type attached to them.
However, since patch v9.0.0993
(commit: 89469d157aea01513bde826b4519dd6b5fbceae4)
those text properties won't be counted when joining lines and therefore
this will cause the adjustment for text properties on joining to go
wrong (and may later cause SIGABRT with an invalid free pointer)
I am not sure, why the condition to not count text properties with a
valid type was added in patch v9.0.993, because no test fails if those
condition is removed. So let's just remove this condition and add a test
that verifies, that we are able to join lines, even when the text
properties attached to it do not have a valid type.
fixes: #13609
closes: #13614
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
Problem: Text properties causes wrong line wrapping to be drawn.
Solution: Find the index of the last text property that inserts text.
closes: #13611
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
Problem: "below" virtual text doesn't work with 'rightleft'.
Solution: Use column from right border with 'rightleft'.
closes: #13071
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
|
|
Problem: Virtual text at a column causes 'breakindent' and 'showbreak'
to be missing (after patch 9.0.1124).
Solution: Add check for "tp_col" in another place where TP_FLAG_WRAP is
checked.
closes: #12769
closes: #13008
closes: #13010
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
|
|
Problem: Wrong display with "above" virtual text and 'linebreak' or
'breakindent' and 'showbreak'.
Solution: Exclude size of "above" virtual text when calculating them.
closes: #13000
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
|
|
Problem: Wrong cursor position with virtual text before double-width
char at window edge.
Solution: Check for double-width char before adding virtual text size.
closes: #12977
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
|
|
Problem: Wrong cursor position with virtual text before a whitespace
character and 'linebreak'.
Solution: Always set "col_adj" to "size - 1" and apply 'linebreak' after
adding the size of 'breakindent' and 'showbreak'.
closes: #12956
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
|
|
Problem: Multiline regex with Visual selection fails when Visual
selection contains virtual text after last char.
Solution: Only include virtual text after last char when getting full
line length.
closes: #12908
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
|
|
Problem: Cursor position still wrong with 'showbreak' and virtual text
after last character or 'listchars' "eol".
Solution: Remove unnecessary w_wcol adjustment in curs_columns(). Also
fix first char of virtual text not shown at the start of a screen
line.
closes: #12478
closes: #12532
closes: #12904
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
|
|
Problem: Normal mode "gM", "gj", "gk" commands behave incorrectly with
virtual text.
Solution: Use linetabsize() instead of linetabsize_str().
closes: #12909
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
|
|
Problem: wrong cursor position with 'showbreak' and lcs-eol
Solution: Add size of 'showbreak' before when 'listchars' "eol" is used.
Also fix wrong cursor position with wrapping virtual text on
empty line and 'showbreak'.
closes: #12891
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
|
|
Problem: Wrong display with wrapping virtual text or unprintable chars,
'showbreak' and 'smoothscroll'.
Solution: Don't skip cells taken by 'showbreak' in screen lines before
"w_skipcol". Combined "n_skip" and "skip_cells".
closes: #12597
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
|
|
Problem: prop_list() does not return text_padding_left
Solution: Store and return the text_padding_left value for text
properties
closes: #12870
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
|
|
Problem: lines disappear when modifying chars before virt text
Solution: take virtual text property length into account
closes: #12558
closes: #12244
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ibby <33922797+SleepySwords@users.noreply.github.com>
|
|
Problem: Not able to get the virtual text property
Solution: Make prop_list() return virtual text and alignment
closes: #12860
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
|
|
Problem: Text property highlight doesn't override a sign highlight over
a tab character
Solution: Let text_property override tab highlighting
This fixes a few problems of text properties:
- text property highlighting when override=true does not overwrite TAB
highlighting
- text property highlighting when override=true does not overwrite TAB
highlighting with :set list
- text property highlighting is used instead of sign highlight after
the actual text ends when signs are present with linehl is set
closes: #21584
closes: #21592
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
Problem: Missing test coverage for blockwise Visual highlight with
virtual that starts with a double-width char.
Solution: Add a new virtual text to the test. Some other small fixes.
closes: #12835
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
|
|
Problem: blockwise Visual highlight not working with virtual text
Solution: Reset the correct variable at the end of virtual selection and
Check for double-width char inside virtual text.
closes: #12606
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
|
|
Problem: Crash with overlong textprop above
Solution: Consider only positive padding
closes: #12665
closes: #12661
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
Problem: Crash when textprop has a very large "padding" value. (Yegappan
Lakshmanan)
Solution: Avoid the "after" count to go negative.
|
|
Problem: Virtual text truncation only works with Unicode 'encoding'.
Solution: Convert the ellipsis character to 'encoding' if needed. (Hirohito
Higashi, closes #12233)
|
|
Problem: Typos in source code and tests.
Solution: Fi the typos. (Dominique Pellé, closes #12217)
|
|
Problem: Cursor in wrong position below line with virtual text below ending
in multi-byte character.
Solution: When checking for last character take care of multi-byte
character.
|
|
Problem: Relative line number not updated with virtual text above.
Solution: Adjust the row for the line number for virtual text above.
(closes #12004)
|
|
Problem: 'colorcolumn' highlight wrong with virtual text above.
Solution: Adjust column of 'colorcolumn' for text propertly. (closes #12004)
|
|
Problem: No regression test for solved problem of #11959.
Solution: Add a test, also with 'list' set. (closes #11959)
|
|
Problem: "$" for 'list' option displayed in wrong position when there are
text properties.
Solution: Adjust logic for order of displayed items. (closes #11959)
|
|
Problem: Virtual text below empty line not displayed.
Solution: Adjust flags and computations. (closes #11959)
|
|
Problem: Code style is not check in test scripts.
Solution: Add basic code style check for test files.
|
|
Problem: Spurious empty line when using text propertie and virtual text.
Solution: Do not set "text_prop_follows" when the other text property is not
virtual text. (closes #11846)
|
|
Problem: Virtual text at a column position is truncated at the window edge.
(Yegappan Lakshmanan)
Solution: Do not truncated virtual text that is placed at a column.
|
|
Problem: Can add text property with negative ID before virtual text
property.
Solution: Remember that a text property with a negative ID was used and give
an appropriate error message. (closes #11725)
Fix index computation.
|
|
Problem: In diff mode virtual text is highlighted incorrectly. (Rick Howe)
Solution: Do not use diff attributes for virtual text. (closes #11714)
|
|
Problem: 'smoothscroll' and virtual text above don't work together.
(Yee Cheng Chin)
Solution: Skip virtual text above when w_skipcol is non-zero.
(closes #11665)
|
|
Problem: Padding before virtual text below is highlighted when 'number' and
'nowrap' are set.
Solution: Save and restore n_attr_skip. (closes #11643)
|
|
Problem: Display errors when adding or removing text property type.
Solution: Perform a full redraw. Only use text properties for which the
type is defined. (closes #11655)
|
|
Problem: 'cursorline' not drawn before virtual text below.
Solution: Add the 'cursorline' attribute to the empty space. (closes #11647)
|
|
Problem: Virtual text below an empty line is misplaced when 'number' is
set.
Solution: Adjust the computations. (closes #11629)
|
|
Problem: Virtual text below cannot be placed below empty lines.
Solution: Add one character. (James Alvarado, closes #11606, closes #11520)
|
|
Problem: 'cursorline' causes virtual text highlight to continue.
Solution: Save and restore line_attr. (closes #11588)
|
|
Problem: Virtual text after the line wraps when 'wrap' is off.
Solution: Only set text_prop_follows when wrapping. (closes #11463)
|
|
Problem: Virtual text property highlight ignores window background.
Solution: Combine text prop attribute with win_attr into extra_attr.
(closes #11462)
|