zeertzjq
ce53e3ea55
patch 9.0.1836: display wrong with virttext, linebreak and breakindent
...
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-09-01 18:49:30 +02:00
Yegappan Lakshmanan
171c5b9b03
patch 9.0.1782: prop_list() does not return text_padding_left
...
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-22 21:48:50 +02:00
Yegappan Lakshmanan
f9037f186a
patch 9.0.1762: Not able to get the virtual text property
...
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-20 18:27:45 +02:00
RestorerZ
68ebcee023
patch 9.0.1594: some internal error messages are translated
...
Problem: Some internal error messages are translated.
Solution: Consistently do not translate internal error messages.
(closes #12459 )
2023-05-31 17:12:14 +01:00
Yegappan Lakshmanan
960dcbd098
patch 9.0.1391: "clear" macros are not always used
...
Problem: "clear" macros are not always used.
Solution: Use ALLOC_ONE, VIM_CLEAR, CLEAR_POINTER and CLEAR_FIELD in more
places. (Yegappan Lakshmanan, closes #12104 )
2023-03-07 17:45:11 +00:00
Yegappan Lakshmanan
14113fdf9c
patch 9.0.1390: FOR_ALL_ macros are defined in an unexpected file
...
Problem: FOR_ALL_ macros are defined in an unexpected file.
Solution: Move FOR_ALL_ macros to macros.h. Add FOR_ALL_HASHTAB_ITEMS.
(Yegappan Lakshmanan, closes #12109 )
2023-03-07 17:13:51 +00:00
Yegappan Lakshmanan
032713f829
patch 9.0.1245: code is indented more than necessary
...
Problem: Code is indented more than necessary.
Solution: Use an early return where it makes sense. (Yegappan Lakshmanan,
closes #11879 )
2023-01-25 21:05:38 +00:00
Bram Moolenaar
a9fa8c58fb
patch 9.0.1133: error message names do not match the items
...
Problem: Error message names do not match the items.
Solution: Add "_str" when the text contains "%s".
2023-01-02 18:10:04 +00:00
Bram Moolenaar
4ce1f99a2d
patch 9.0.1077: can add text property with negative ID before virtual text
...
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-19 13:31:06 +00:00
Bram Moolenaar
89469d157a
patch 9.0.0993: display errors when adding or removing text property type
...
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-02 20:46:26 +00:00
Bram Moolenaar
ef2c325f5e
patch 9.0.0949: crash when unletting a variable while listing variables
...
Problem: Crash when unletting a variable while listing variables.
Solution: Disallow changing a hashtable while going over the entries.
(closes #11435 )
2022-11-25 16:31:51 +00:00
dundargoc
c57b5bcd22
patch 9.0.0828: various typos
...
Problem: Various typos.
Solution: Correct typos. (closes #11432 )
2022-11-02 13:30:51 +00:00
Bram Moolenaar
d93009eb35
patch 9.0.0741: cannot specify an ID for each item with prop_add_list()
...
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 )
2022-10-13 14:35:24 +01:00
Bram Moolenaar
4997f2a605
patch 9.0.0740: prop_add_list() gives multiple errors for invalid argument
...
Problem: prop_add_list() gives multiple errors for invalid argument.
Solution: Only give one error message.
2022-10-13 14:00:45 +01:00
Bram Moolenaar
fb593c5350
patch 9.0.0489: using "end_lnum" with virtual text causes problems
...
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".
2022-09-17 18:57:36 +01:00
Bram Moolenaar
ebd0e8bb85
patch 9.0.0466: virtual text wrong after adding line break after line
...
Problem: Virtual text wrong after adding line break after line.
Solution: Pass an "eol" flag to where text properties are adjusted.
(closes #11131 )
2022-09-14 22:13:59 +01:00
Bram Moolenaar
98b373075e
patch 9.0.0462: ASAN warning for integer overflow
...
Problem: ASAN warning for integer overflow.
Solution: Check for tp_col to be MAXCOL.
2022-09-14 12:06:53 +01:00
Bram Moolenaar
3b93cf218f
patch 9.0.0458: splitting a line with a text prop "above" moves it down
...
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.
2022-09-13 18:34:18 +01:00
Bram Moolenaar
6eda17d881
patch 9.0.0452: Visual highlighting extends into virtual text prop
...
Problem: Visual highlighting extends into virtual text prop.
Solution: Do not highlight what isn't actually selected. Fix ordering of
stored text props.
2022-09-12 19:25:11 +01:00
Bram Moolenaar
c9dc03fff5
patch 9.0.0451: virtual text "above" does not work with 'nowrap'
...
Problem: Virtual text "above" does not work with 'nowrap'.
Solution: Do wrap the line after. (closes #11084 )
2022-09-12 17:51:07 +01:00
Bram Moolenaar
04e0ed1ddf
patch 9.0.0438: cannot put virtual text above a line
...
Problem: Cannot put virtual text above a line.
Solution: Add the "above" value for "text_align".
2022-09-10 20:00:56 +01:00
Bram Moolenaar
d83392a43a
patch 9.0.0345: error message for list argument could be clearer
...
Problem: Error message for list argument could be clearer.
Solution: Include the argument number. (Yegappan Lakshmanan, closes #11027 )
2022-09-01 12:22:46 +01:00
Yegappan Lakshmanan
04c4c5746e
patch 9.0.0335: checks for Dictionary argument often give a vague error
...
Problem: Checks for Dictionary argument often give a vague error message.
Solution: Give a useful error message. (Yegappan Lakshmanan, closes #11009 )
2022-08-30 19:48:24 +01:00
Bram Moolenaar
f5240b96f7
patch 9.0.0252: cursor in wrong place after virtual text
...
Problem: Cursor in wrong place after virtual text.
Solution: Do not change the length of a virtual text property.
(closes #10964 )
2022-08-24 12:24:37 +01:00
Bram Moolenaar
f396ce83ee
patch 9.0.0247: cannot add padding to virtual text without highlight
...
Problem: Cannot add padding to virtual text without highlight.
Solution: Add the "text_padding_left" argument. (issue #10906 )
2022-08-23 18:39:37 +01:00
Ben Jackson
a7704226a2
patch 9.0.0233: removing multiple text properties takes many calls
...
Problem: Removing multiple text properties takes many calls.
Solution: Pass a list to prop_remove(). (Ben Jackson, closes #10945 )
2022-08-20 20:54:51 +01:00
Bram Moolenaar
d8d4cfcb39
patch 9.0.0214: splitting a line may duplicate virtual text
...
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 )
2022-08-15 15:55:10 +01:00
Bram Moolenaar
a4d158b3c8
patch 9.0.0206: redraw flags are not named specifically
...
Problem: Redraw flags are not named specifically.
Solution: Prefix "UPD_" to the flags, for UPDate_screen().
2022-08-14 14:17:45 +01:00
Bram Moolenaar
28c9f89571
patch 9.0.0205: cursor in wrong position when inserting after virtual text
...
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 )
2022-08-14 13:28:55 +01:00
Bram Moolenaar
8f369fb1ab
patch 9.0.0200: cursor wrong if 'nowrap' and two right aligned text props
...
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 )
2022-08-13 19:35:05 +01:00
Bram Moolenaar
326c5d36e7
patch 9.0.0194: cursor displayed in wrong position after removing text prop
...
Problem: Cursor displayed in wrong position after removing text prop. (Ben
Jackson)
Solution: Invalidate the cursor position. (closes #10898 )
2022-08-12 13:05:49 +01:00
Bram Moolenaar
82b14c143a
patch 9.0.0188: strange effects when using "text_align" with non-zero column
...
Problem: Strange effects when using virtual text with "text_align" and
non-zero column. (Martin Tournoij)
Solution: Give an error. (closes #10888 )
2022-08-10 19:50:47 +01:00
Bram Moolenaar
1024690c01
patch 9.0.0172: trying to allocate zero bytes
...
Problem: Trying to allocate zero bytes.
Solution: Do not allocate the proptype array when there are none.
(closes #10867 )
2022-08-08 17:08:05 +01:00
Bram Moolenaar
cf85d97baf
patch 9.0.0169: insufficient testing for line2byte() with text properties
...
Problem: Insufficient testing for line2byte() with text properties.
Solution: Add tests with a lot of text.
2022-08-08 14:59:47 +01:00
Bram Moolenaar
38ea2733b4
patch 9.0.0167: checking for text properties could be a bit more efficient
...
Problem: Checking for text properties could be a bit more efficient.
Solution: Return early when there are no text properties. Update TODO
items.
2022-08-07 22:04:56 +01:00
Bram Moolenaar
e44336b00a
patch 9.0.0165: looking up a text property type by ID is slow
...
Problem: Looking up a text property type by ID is slow.
Solution: Keep an array of property types sorted on ID.
2022-08-07 18:20:08 +01:00
Bram Moolenaar
7d0f7e9524
patch 9.0.0154: text properties wrong after splitting a line
...
Problem: Text properties wrong after splitting a line.
Solution: Check for text properties after the line. (closes #10857 )
2022-08-06 17:10:57 +01:00
Bram Moolenaar
4d91d347e6
patch 9.0.0151: a "below" aligned text property does not work with 'nowrap'
...
Problem: A "below" aligned text property does not work with 'nowrap'.
Solution: Start a new screen line to display the virtual text.
(closes #10851 )
2022-08-06 13:48:20 +01:00
Bram Moolenaar
213bbaf15a
patch 9.0.0145: substitute that joins lines drops text properties
...
Problem: Substitute that joins lines drops text properties.
Solution: Move text properties of the last line to the new line.
2022-08-05 19:46:48 +01:00
Bram Moolenaar
f4ba8bc47e
patch 9.0.0144: text property cannot override 'cursorline' highlight
...
Problem: Text property cannot override 'cursorline' highlight.
Solution: Add the "override" flag to prop_type_add(). (closes #5533 ,
closes #8225 ).
2022-08-05 17:05:04 +01:00
Bram Moolenaar
e175dc6911
patch 9.0.0133: virtual text after line moves to joined line
...
Problem: Virtual text after line moves to joined line. (Yegappan
Lakshmanan)
Solution: When joining lines only keep virtual text after the last line.
2022-08-01 22:18:50 +01:00
Bram Moolenaar
783ef7214b
patch 9.0.0131: virtual text with Tab is not displayed correctly
...
Problem: Virtual text with Tab is not displayed correctly.
Solution: Change any Tab to a space.
2022-08-01 16:11:06 +01:00
Bram Moolenaar
b7963df98f
patch 9.0.0121: cannot put virtual text after or below a line
...
Problem: Cannot put virtual text after or below a line.
Solution: Add "text_align" and "text_wrap" arguments.
2022-07-31 17:12:43 +01:00
Bram Moolenaar
3a4cd39d47
patch 9.0.0117: text of removed textprop with text is not freed
...
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.
2022-07-30 22:17:18 +01:00
Bram Moolenaar
7f9969c559
patch 9.0.0067: cannot show virtual text
...
Problem: Cannot show virtual text.
Solution: Initial changes for virtual text support, using text properties.
2022-07-25 18:13:54 +01:00
Bram Moolenaar
d61efa50f8
patch 9.0.0063: too many type casts for dict_get functions
...
Problem: Too many type casts for dict_get functions.
Solution: Change the key argument from "char_u *" to "char *".
2022-07-23 09:52:04 +01:00
Bram Moolenaar
fa4873ccfc
patch 9.0.0013: reproducing memory access errors can be difficult
...
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.
2022-06-30 22:13:59 +01:00
Bram Moolenaar
93a1096fe4
patch 8.2.5107: some callers of rettv_list_alloc() check for not OK
...
Problem: Some callers of rettv_list_alloc() check for not OK. (Christ van
Willegen)
Solution: Use "==" instead of "!=" when checking the return value.
2022-06-16 11:42:09 +01:00
Paul Ollis
4c3d21acaa
patch 8.2.5014: byte offsets are wrong when using text properties
...
Problem: Byte offsets are wrong when using text properties.
Solution: Make sure text properties do not affect the byte counts.
(Paul Ollis, closes #10474 )
2022-05-24 21:26:37 +01:00
LemonBoy
698cb4c8fa
patch 8.2.4954: inserting line breaks text property spanning two lines
...
Problem: Inserting line breaks text property spanning more then one line.
Solution: Check TP_FLAG_CONT_PREV and TP_FLAG_CONT_NEXT. (closes #10423 )
2022-05-14 18:10:15 +01:00