summaryrefslogtreecommitdiff
path: root/src/textprop.c
Commit message (Collapse)AuthorAgeFilesLines
* patch 9.0.0741: cannot specify an ID for each item with prop_add_list()v9.0.0741Bram Moolenaar2022-10-131-2/+5
| | | | | | Problem: Cannot specify an ID for each item with prop_add_list(). (Sergey Vlasov) Solution: Add an optional fifth number to the item. (closes #11360)
* patch 9.0.0740: prop_add_list() gives multiple errors for invalid argumentv9.0.0740Bram Moolenaar2022-10-131-5/+10
| | | | | Problem: prop_add_list() gives multiple errors for invalid argument. Solution: Only give one error message.
* patch 9.0.0489: using "end_lnum" with virtual text causes problemsv9.0.0489Bram Moolenaar2022-09-171-0/+8
| | | | | | Problem: Using "end_lnum" with virtual text causes problems. Solution: Disallow using "end_lnum" with virtual text. (closes #11151) Also disallow "end_col" and "length".
* patch 9.0.0466: virtual text wrong after adding line break after linev9.0.0466Bram Moolenaar2022-09-141-8/+17
| | | | | | Problem: Virtual text wrong after adding line break after line. Solution: Pass an "eol" flag to where text properties are adjusted. (closes #11131)
* patch 9.0.0462: ASAN warning for integer overflowv9.0.0462Bram Moolenaar2022-09-141-1/+1
| | | | | Problem: ASAN warning for integer overflow. Solution: Check for tp_col to be MAXCOL.
* patch 9.0.0458: splitting a line with a text prop "above" moves it downv9.0.0458Bram Moolenaar2022-09-131-5/+9
| | | | | | Problem: Splitting a line with a text prop "above" moves it to a new line below. Solution: Keep an "above" text prop above the first line.
* patch 9.0.0452: Visual highlighting extends into virtual text propv9.0.0452Bram Moolenaar2022-09-121-4/+14
| | | | | | Problem: Visual highlighting extends into virtual text prop. Solution: Do not highlight what isn't actually selected. Fix ordering of stored text props.
* patch 9.0.0451: virtual text "above" does not work with 'nowrap'v9.0.0451Bram Moolenaar2022-09-121-4/+9
| | | | | Problem: Virtual text "above" does not work with 'nowrap'. Solution: Do wrap the line after. (closes #11084)
* patch 9.0.0438: cannot put virtual text above a linev9.0.0438Bram Moolenaar2022-09-101-15/+24
| | | | | Problem: Cannot put virtual text above a line. Solution: Add the "above" value for "text_align".
* patch 9.0.0345: error message for list argument could be clearerv9.0.0345Bram Moolenaar2022-09-011-4/+1
| | | | | Problem: Error message for list argument could be clearer. Solution: Include the argument number. (Yegappan Lakshmanan, closes #11027)
* patch 9.0.0335: checks for Dictionary argument often give a vague errorv9.0.0335Yegappan Lakshmanan2022-08-301-16/+4
| | | | | Problem: Checks for Dictionary argument often give a vague error message. Solution: Give a useful error message. (Yegappan Lakshmanan, closes #11009)
* patch 9.0.0252: cursor in wrong place after virtual textv9.0.0252Bram Moolenaar2022-08-241-1/+2
| | | | | | Problem: Cursor in wrong place after virtual text. Solution: Do not change the length of a virtual text property. (closes #10964)
* patch 9.0.0247: cannot add padding to virtual text without highlightv9.0.0247Bram Moolenaar2022-08-231-2/+108
| | | | | Problem: Cannot add padding to virtual text without highlight. Solution: Add the "text_padding_left" argument. (issue #10906)
* patch 9.0.0233: removing multiple text properties takes many callsv9.0.0233Ben Jackson2022-08-201-10/+65
| | | | | Problem: Removing multiple text properties takes many calls. Solution: Pass a list to prop_remove(). (Ben Jackson, closes #10945)
* patch 9.0.0214: splitting a line may duplicate virtual textv9.0.0214Bram Moolenaar2022-08-151-0/+9
| | | | | | Problem: Splitting a line may duplicate virtual text. (Ben Jackson) Solution: Don't duplicate a text property with virtual text. Make auto-indenting work better. (closes #10919)
* patch 9.0.0206: redraw flags are not named specificallyv9.0.0206Bram Moolenaar2022-08-141-4/+4
| | | | | Problem: Redraw flags are not named specifically. Solution: Prefix "UPD_" to the flags, for UPDate_screen().
* patch 9.0.0205: cursor in wrong position when inserting after virtual textv9.0.0205Bram Moolenaar2022-08-141-1/+3
| | | | | | | Problem: Cursor in wrong position when inserting after virtual text. (Ben Jackson) Solution: Put the cursor after the virtual text, where the text will be inserted. (closes #10914)
* patch 9.0.0200: cursor wrong if 'nowrap' and two right aligned text propsv9.0.0200Bram Moolenaar2022-08-131-2/+15
| | | | | | | Problem: cursor in a wrong positoin if 'wrap' is off and using two right aligned text props in one line. Solution: Count an extra line for a right aligned text property after a below or right aligned text property. (issue #10909)
* patch 9.0.0194: cursor displayed in wrong position after removing text propv9.0.0194Bram Moolenaar2022-08-121-0/+2
| | | | | | Problem: Cursor displayed in wrong position after removing text prop. (Ben Jackson) Solution: Invalidate the cursor position. (closes #10898)
* patch 9.0.0188: strange effects when using "text_align" with non-zero columnv9.0.0188Bram Moolenaar2022-08-101-0/+5
| | | | | | Problem: Strange effects when using virtual text with "text_align" and non-zero column. (Martin Tournoij) Solution: Give an error. (closes #10888)
* patch 9.0.0172: trying to allocate zero bytesv9.0.0172Bram Moolenaar2022-08-081-1/+1
| | | | | | Problem: Trying to allocate zero bytes. Solution: Do not allocate the proptype array when there are none. (closes #10867)
* patch 9.0.0169: insufficient testing for line2byte() with text propertiesv9.0.0169Bram Moolenaar2022-08-081-4/+0
| | | | | Problem: Insufficient testing for line2byte() with text properties. Solution: Add tests with a lot of text.
* patch 9.0.0167: checking for text properties could be a bit more efficientv9.0.0167Bram Moolenaar2022-08-071-6/+3
| | | | | | Problem: Checking for text properties could be a bit more efficient. Solution: Return early when there are no text properties. Update TODO items.
* patch 9.0.0165: looking up a text property type by ID is slowv9.0.0165Bram Moolenaar2022-08-071-35/+81
| | | | | Problem: Looking up a text property type by ID is slow. Solution: Keep an array of property types sorted on ID.
* patch 9.0.0154: text properties wrong after splitting a linev9.0.0154Bram Moolenaar2022-08-061-10/+18
| | | | | Problem: Text properties wrong after splitting a line. Solution: Check for text properties after the line. (closes #10857)
* patch 9.0.0151: a "below" aligned text property does not work with 'nowrap'v9.0.0151Bram Moolenaar2022-08-061-0/+23
| | | | | | Problem: A "below" aligned text property does not work with 'nowrap'. Solution: Start a new screen line to display the virtual text. (closes #10851)
* patch 9.0.0145: substitute that joins lines drops text propertiesv9.0.0145Bram Moolenaar2022-08-051-1/+23
| | | | | Problem: Substitute that joins lines drops text properties. Solution: Move text properties of the last line to the new line.
* patch 9.0.0144: text property cannot override 'cursorline' highlightv9.0.0144Bram Moolenaar2022-08-051-2/+12
| | | | | | Problem: Text property cannot override 'cursorline' highlight. Solution: Add the "override" flag to prop_type_add(). (closes #5533, closes #8225).
* patch 9.0.0133: virtual text after line moves to joined linev9.0.0133Bram Moolenaar2022-08-011-10/+15
| | | | | | Problem: Virtual text after line moves to joined line. (Yegappan Lakshmanan) Solution: When joining lines only keep virtual text after the last line.
* patch 9.0.0131: virtual text with Tab is not displayed correctlyv9.0.0131Bram Moolenaar2022-08-011-1/+7
| | | | | Problem: Virtual text with Tab is not displayed correctly. Solution: Change any Tab to a space.
* patch 9.0.0121: cannot put virtual text after or below a linev9.0.0121Bram Moolenaar2022-07-311-22/+76
| | | | | Problem: Cannot put virtual text after or below a line. Solution: Add "text_align" and "text_wrap" arguments.
* patch 9.0.0117: text of removed textprop with text is not freedv9.0.0117Bram Moolenaar2022-07-301-3/+30
| | | | | | Problem: Text of removed textprop with text is not freed. Solution: Free the text when the property is removed. Reduce the array size to ignore NULLs at the end.
* patch 9.0.0067: cannot show virtual textv9.0.0067Bram Moolenaar2022-07-251-22/+80
| | | | | Problem: Cannot show virtual text. Solution: Initial changes for virtual text support, using text properties.
* patch 9.0.0063: too many type casts for dict_get functionsv9.0.0063Bram Moolenaar2022-07-231-16/+16
| | | | | Problem: Too many type casts for dict_get functions. Solution: Change the key argument from "char_u *" to "char *".
* patch 9.0.0013: reproducing memory access errors can be difficultv9.0.0013Bram Moolenaar2022-06-301-4/+13
| | | | | | | 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.
* patch 8.2.5107: some callers of rettv_list_alloc() check for not OKv8.2.5107Bram Moolenaar2022-06-161-1/+1
| | | | | | Problem: Some callers of rettv_list_alloc() check for not OK. (Christ van Willegen) Solution: Use "==" instead of "!=" when checking the return value.
* patch 8.2.5014: byte offsets are wrong when using text propertiesv8.2.5014Paul Ollis2022-05-241-2/+9
| | | | | | Problem: Byte offsets are wrong when using text properties. Solution: Make sure text properties do not affect the byte counts. (Paul Ollis, closes #10474)
* patch 8.2.4954: inserting line breaks text property spanning two linesv8.2.4954LemonBoy2022-05-141-4/+5
| | | | | Problem: Inserting line breaks text property spanning more then one line. Solution: Check TP_FLAG_CONT_PREV and TP_FLAG_CONT_NEXT. (closes #10423)
* patch 8.2.4787: prop_find() does not find the right propertyv8.2.4787LemonBoy2022-04-181-13/+17
| | | | | Problem: prop_find() does not find the right property. Solution: Fix the scan order. (closes #10220)
* patch 8.2.4683: verbose check with dict_find() to see if a key is presentv8.2.4683Yegappan Lakshmanan2022-04-041-11/+11
| | | | | Problem: Verbose check with dict_find() to see if a key is present. Solution: Add dict_has_key(). (Yegappan Lakshmanan, closes #10074)
* patch 8.2.4012: error messages are spread outv8.2.4012Bram Moolenaar2022-01-051-9/+7
| | | | | Problem: Error messages are spread out. Solution: Move the last error messages to errors.h.
* patch 8.2.4010: error messages are spread outv8.2.4010Bram Moolenaar2022-01-051-2/+2
| | | | | Problem: Error messages are spread out. Solution: Move more error messages to errors.h.
* patch 8.2.3977: error messages are spread outv8.2.3977Bram Moolenaar2022-01-011-1/+1
| | | | | Problem: Error messages are spread out. Solution: Move more error messages to errors.h.
* patch 8.2.3967: error messages are spread outv8.2.3967Bram Moolenaar2022-01-011-10/+10
| | | | | Problem: Error messages are spread out. Solution: Move more errors to errors.h.
* patch 8.2.3961: error messages are spread outv8.2.3961Bram Moolenaar2021-12-311-9/+9
| | | | | Problem: Error messages are spread out. Solution: Move more errors to errors.h.
* patch 8.2.3916: no error for passing an invalid line number to append()v8.2.3916Bram Moolenaar2021-12-271-6/+4
| | | | | Problem: No error for passing an invalid line number to append(). Solution: In Vim9 script check for a non-negative number. (closes #9417)
* patch 8.2.3652: can only get text properties one line at a timev8.2.3652Yegappan Lakshmanan2021-11-231-25/+232
| | | | | | Problem: Can only get text properties one line at a time. Solution: Add options to prop_list() to use a range of lines and filter by types. (Yegappan Lakshmanan, closes #9138)
* patch 8.2.3356: adding many text properties requires a lot of function callsv8.2.3356Yegappan Lakshmanan2021-08-161-76/+171
| | | | | | Problem: Adding many text properties requires a lot of function calls. Solution: Add the prop_add_list() function. (Yegappan Lakshmanan, closes #8751)
* patch 8.2.3272: cannot use id zero with prop_find()v8.2.3272Bram Moolenaar2021-08-011-1/+1
| | | | | Problem: Cannot use id zero with prop_find(). (Naohiro Ono) Solution: Also accept id zero.
* patch 8.2.3270: prop_find() finds property with ID -2v8.2.3270Bram Moolenaar2021-08-011-6/+7
| | | | | Problem: prop_find() finds property with ID -2. Solution: Use a separate flag to indicate an ID was specified. (issue #8674)