summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_textprop.vim
AgeCommit message (Collapse)Author
2024-03-24patch 9.1.0201: gM not working correctly with virt textv9.1.0201Dylan Thacker-Smith
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>
2024-03-24patch 9.1.0200: `gj`/`gk` not skipping over outer virtual text linesv9.1.0200Dylan Thacker-Smith
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>
2024-03-20patch 9.1.0189: Memory leak with "above" virttext and 'relativenumber'v9.1.0189zeertzjq
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>
2024-03-17patch 9.1.0185: 'wincolor' hl missing with 'rightleft', "below" virttext, ↵v9.1.0185zeertzjq
'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>
2024-03-14patch 9.1.0179: 'wincolor' highlight missing with "below" virtual textv9.1.0179zeertzjq
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>
2024-03-06patch 9.1.0153: Text properties corrupted with fo+=aw and backspacev9.1.0153zeertzjq
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>
2024-02-27patch 9.1.0140: cursor on wrong row after 1 char 'below' virtual text when ↵v9.1.0140Dylan Thacker-Smith
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>
2024-02-21patch 9.1.0124: display of below/right virtual text with non-virtual text ↵v9.1.0124Dylan Thacker-Smith
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>
2023-12-03patch 9.0.2146: text-property without type errors when joiningv9.0.2146Christian Brabandt
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>
2023-12-03patch 9.0.2144: Text properties causes wrong line wrappingv9.0.2144zeertzjq
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>
2023-09-11patch 9.0.1896: "below" virtual text doesn't work with 'rightleft'v9.0.1896zeertzjq
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>
2023-09-02patch 9.0.1851: breakindent missing by virt textv9.0.1851zeertzjq
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>
2023-09-01patch 9.0.1836: display wrong with virttext, linebreak and breakindentv9.0.1836zeertzjq
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>
2023-08-31patch 9.0.1828: cursor wrong with virt text before double-width charv9.0.1828zeertzjq
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>
2023-08-30patch 9.0.1825: wrong cursor position with virt text and 'linebreak'v9.0.1825zeertzjq
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>
2023-08-27patch 9.0.1802: Multiline regex with Visual selection fails with virtual textv9.0.1802zeertzjq
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>
2023-08-27patch 9.0.1800: Cursor position still wrong with 'showbreak' and virtual textv9.0.1800zeertzjq
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>
2023-08-27patch 9.0.1792: problem with gj/gk/gM and virtual textv9.0.1792zeertzjq
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>
2023-08-23patch 9.0.1785: wrong cursor position with 'showbreak' and lcs-eolv9.0.1785zeertzjq
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>
2023-08-22patch 9.0.1783: Display issues with virt text smoothscroll and showbreakv9.0.1783zeertzjq
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>
2023-08-22patch 9.0.1782: prop_list() does not return text_padding_leftv9.0.1782Yegappan Lakshmanan
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>
2023-08-20patch 9.0.1770: lines disappear when modifying chars before virt textv9.0.1770Ibby
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>
2023-08-20patch 9.0.1762: Not able to get the virtual text propertyv9.0.1762Yegappan Lakshmanan
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>
2023-08-19patch 9.0.1749: Text property highlight doesn't override a sign highlight on TABv9.0.1749Christian Brabandt
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>
2023-08-19patch 9.0.1745: Missing test coverage for blockwise Visual highlightv9.0.1745zeertzjq
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>
2023-08-17patch 9.0.1731: blockwise Visual highlight not working with virtual textv9.0.1731zeertzjq
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>
2023-08-12patch 9.0.1695: Crash with overlong textprop abovev9.0.1695Christian Brabandt
Problem: Crash with overlong textprop above Solution: Consider only positive padding closes: #12665 closes: #12661 Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-04-23patch 9.0.1482: crash when textprop has a very large "padding" valuev9.0.1482Bram Moolenaar
Problem: Crash when textprop has a very large "padding" value. (Yegappan Lakshmanan) Solution: Avoid the "after" count to go negative.
2023-04-17patch 9.0.1463: virtual text truncation only works with Unicode 'encoding'v9.0.1463h-east
Problem: Virtual text truncation only works with Unicode 'encoding'. Solution: Convert the ellipsis character to 'encoding' if needed. (Hirohito Higashi, closes #12233)
2023-04-14patch 9.0.1453: typos in source code and testsv9.0.1453Dominique Pelle
Problem: Typos in source code and tests. Solution: Fi the typos. (Dominique Pellé, closes #12217)
2023-02-19patch 9.0.1327: cursor in wrong position below line with virtual text belowv9.0.1327Bram Moolenaar
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.
2023-02-19patch 9.0.1326: relative line number not updated with virtual text abovev9.0.1326Bram Moolenaar
Problem: Relative line number not updated with virtual text above. Solution: Adjust the row for the line number for virtual text above. (closes #12004)
2023-02-19patch 9.0.1325: 'colorcolumn' highlight wrong with virtual text abovev9.0.1325Bram Moolenaar
Problem: 'colorcolumn' highlight wrong with virtual text above. Solution: Adjust column of 'colorcolumn' for text propertly. (closes #12004)
2023-02-12patch 9.0.1306: no regression test for solved problem of #11959v9.0.1306Bram Moolenaar
Problem: No regression test for solved problem of #11959. Solution: Add a test, also with 'list' set. (closes #11959)
2023-02-12patch 9.0.1304: "$" for 'list' option displayed in wrong positionv9.0.1304Bram Moolenaar
Problem: "$" for 'list' option displayed in wrong position when there are text properties. Solution: Adjust logic for order of displayed items. (closes #11959)
2023-02-11patch 9.0.1301: virtual text below empty line not displayedv9.0.1301Bram Moolenaar
Problem: Virtual text below empty line not displayed. Solution: Adjust flags and computations. (closes #11959)
2023-01-28patch 9.0.1257: code style is not check in test scriptsv9.0.1257Bram Moolenaar
Problem: Code style is not check in test scripts. Solution: Add basic code style check for test files.
2023-01-21patch 9.0.1226: spurious empty line when using text propertiesv9.0.1226Bram Moolenaar
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)
2023-01-01patch 9.0.1124: virtual text at a column position is truncatedv9.0.1124Bram Moolenaar
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.
2022-12-19patch 9.0.1077: can add text property with negative ID before virtual textv9.0.1077Bram Moolenaar
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.
2022-12-17patch 9.0.1067: in diff mode virtual text is highlighted incorrectlyv9.0.1067Bram Moolenaar
Problem: In diff mode virtual text is highlighted incorrectly. (Rick Howe) Solution: Do not use diff attributes for virtual text. (closes #11714)
2022-12-06patch 9.0.1019: 'smoothscroll' and virtual text above don't work togetherv9.0.1019Bram Moolenaar
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)
2022-12-02patch 9.0.0995: padding before virtual text is highlightedv9.0.0995Bram Moolenaar
Problem: Padding before virtual text below is highlighted when 'number' and 'nowrap' are set. Solution: Save and restore n_attr_skip. (closes #11643)
2022-12-02patch 9.0.0993: display errors when adding or removing text property typev9.0.0993Bram Moolenaar
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)
2022-12-01patch 9.0.0982: 'cursorline' not drawn before virtual text belowv9.0.0982Bram Moolenaar
Problem: 'cursorline' not drawn before virtual text below. Solution: Add the 'cursorline' attribute to the empty space. (closes #11647)
2022-11-29patch 9.0.0975: virtual text below empty line misplaced when 'number' setv9.0.0975Bram Moolenaar
Problem: Virtual text below an empty line is misplaced when 'number' is set. Solution: Adjust the computations. (closes #11629)
2022-11-27patch 9.0.0962: virtual text below cannot be placed below empty linesv9.0.0962porygonisaduck
Problem: Virtual text below cannot be placed below empty lines. Solution: Add one character. (James Alvarado, closes #11606, closes #11520)
2022-11-24patch 9.0.0944: 'cursorline' causes virtual text highlight to continuev9.0.0944Bram Moolenaar
Problem: 'cursorline' causes virtual text highlight to continue. Solution: Save and restore line_attr. (closes #11588)
2022-11-18patch 9.0.0905: virtual text after the line wraps when 'wrap' is offv9.0.0905Bram Moolenaar
Problem: Virtual text after the line wraps when 'wrap' is off. Solution: Only set text_prop_follows when wrapping. (closes #11463)
2022-11-17patch 9.0.0894: virtual text property highlight ignores window backgroundv9.0.0894Bram Moolenaar
Problem: Virtual text property highlight ignores window background. Solution: Combine text prop attribute with win_attr into extra_attr. (closes #11462)