summaryrefslogtreecommitdiffstats
path: root/src/charset.c
AgeCommit message (Collapse)Author
2024-04-13patch 9.1.0313: Crash when using heredoc with comment in command blockv9.1.0313zeertzjq
Problem: Crash when using heredoc with comment in command block. Solution: Handle a newline more like the end of the line, fix coverity warning (zeertzjq). closes: #14535 Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-12patch 9.1.0312: heredocs are not supported for :commandsv9.1.0312Yegappan Lakshmanan
Problem: heredocs are not supported for :commands (@balki) Solution: Add heredoc support (Yegappan Lakshmanan) fixes: #14491 closes: #14528 Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-28patch 9.1.0214: Duplicate condition in win_lbr_chartabsize()v9.1.0214zeertzjq
Problem: Duplicate condition in win_lbr_chartabsize(). Solution: Remove the duplicate condition, as it's already checked above. (zeertzjq) closes: #14320 Signed-off-by: zeertzjq <zeertzjq@outlook.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-12patch 9.1.0172: More code can use ml_get_buf_len() instead of STRLEN()v9.1.0172zeertzjq
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>
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-01-25patch 9.1.0054: 'linebreak' may still apply to leading whitespacev9.1.0054zeertzjq
Problem: 'linebreak' may still apply to leading whitespace (VanaIgr) Solution: Compare pointers instead of virtual columns. (zeertzjq) related: neovim/neovim#27180 closes: #13915 Co-authored-by: VanaIgr <vanaigranov@gmail.com> Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-17patch 9.1.0038: Unnecessary loop in getvcol()v9.1.0038zeertzjq
Problem: Unnecessary loop in getvcol(). Solution: Compare next char position with pos->col directly. (zeertzjq) The loop below already handles end of line before checking for posptr, and the next char is after pos->col whether pos->col is at the start or in the middle of the char in question, so neither the NUL check nor the mb_head_off() are needed when comparing the position of the next char with pos->col directly. closes: #13878 Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-17patch 9.1.0037: Calling get_breakindent_win() repeatedly when computing virtcolv9.1.0037zeertzjq
Problem: Calling get_breakindent_win() repeatedly when computing virtual column, and get_breakindent_win() does a STRCMP() on the whole line since patch 9.0.0016. Solution: Cache the result, since the line doesn't change. (zeertzjq) closes: #13879 Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-04patch 9.1.0006: is*() and to*() function may be unsafev9.1.0006Keith Thompson
Problem: is*() and to*() function may be unsafe Solution: Add SAFE_* macros and start using those instead (Keith Thompson) Use SAFE_() macros for is*() and to*() functions The standard is*() and to*() functions declared in <ctype.h> have undefined behavior for negative arguments other than EOF. If plain char is signed, passing an unchecked value from argv for from user input to one of these functions has undefined behavior. Solution: Add SAFE_*() macros that cast the argument to unsigned char. Most implementations behave sanely for negative arguments, and most character values in practice are non-negative, but it's still best to avoid undefined behavior. The change from #13347 has been omitted, as this has already been separately fixed in commit ac709e2fc0db6d31abb7da96f743c40956b60c3a (v9.0.2054) fixes: #13332 closes: #13347 Signed-off-by: Keith Thompson <Keith.S.Thompson@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-14patch 9.0.2021: Coverity complains about change in charsetv9.0.2021Christian Brabandt
Problem: Coverity complains about change in charset (after v9.0.2017) Solution: check pointer t at index 0 closes: #13322 Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-11patch 9.0.2017: linebreak applies for leading whitespacev9.0.2017Christian Brabandt
Problem: linebreak applies for leading whitespace Solution: only apply linebreak, once we have found non-breakat chars in the line closes: #13228 closes: #13243 Signed-off-by: Christian Brabandt <cb@256bit.org>
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-28patch 9.0.1813: linebreak incorrect drawn with breakindentv9.0.1813zeertzjq
Problem: 'linebreak' is incorrectly drawn after 'breakindent'. Solution: Don't include 'breakindent' size when already after it. closes: #12937 closes: #12940 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-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-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-13patch 9.0.1711: dead code in charset.cv9.0.1711zeertzjq
Problem: dead code in charset.c Solution: remove it linetabsize_col() calls init_chartabsize_arg() with 0 as "lnum", so cts.cts_has_prop_with_text is always FALSE. closes: #PR Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-03-12patch 9.0.1403: unused variables and functionsv9.0.1403Dominique Pelle
Problem: Unused variables and functions. Solution: Delete items and adjust #ifdefs. (Dominique Pellé, closes #12145)
2023-03-04patch 9.0.1380: CTRL-X on 2**64 subtracts twov9.0.1380Bram Moolenaar
Problem: CTRL-X on 2**64 subtracts two. (James McCoy) Solution: Correct computation for large number. (closes #12103)
2023-02-21patch 9.0.1336: functions without arguments are not always declared properlyv9.0.1336Yegappan Lakshmanan
Problem: Functions without arguments are not always declared properly. Solution: Use "(void)" instead of "()". (Yegappan Lakshmanan, closes #12031)
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-16patch 9.0.1314: :messages behavior depends on 'fileformat' of current bufferv9.0.1314cero1988
Problem: :messages behavior depends on 'fileformat' of current buffer. Solution: Pass the buffer pointer to where it is used. (Mirko Ceroni, closes #11995)
2023-02-12patch 9.0.1305: cursor in wrong line with virtual text abovev9.0.1305Bram Moolenaar
Problem: Cursor in wrong line with virtual text above. Solution: Count extra line for text property above/below. (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-02-05patch 9.0.1285: various small problemsv9.0.1285Bram Moolenaar
Problem: Various small problems. Solution: Adjust white space and comments.
2023-01-09patch 9.0.1166: code is indented more than necessaryv9.0.1166Yegappan Lakshmanan
Problem: Code is indented more than necessary. Solution: Use an early return where it makes sense. (Yegappan Lakshmanan, closes #11792)
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-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.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-11-02patch 9.0.0828: various typosv9.0.0828dundargoc
Problem: Various typos. Solution: Correct typos. (closes #11432)
2022-10-14patch 9.0.0751: 'scrolloff' does not work well with 'smoothscroll'v9.0.0751Bram Moolenaar
Problem: 'scrolloff' does not work well with 'smoothscroll'. Solution: Make positioning the cursor a bit better. Rename functions.
2022-10-13patch 9.0.0747: too many #ifdefsv9.0.0747Martin Tournoij
Problem: Too many #ifdefs. Solution: Gradudate the +cmdline_info feature. (Martin Tournoij, closes #11330)
2022-10-09patch 9.0.0709: virtual text "after" not correct with 'nowrap'v9.0.0709Bram Moolenaar
Problem: Virtual text "after" not correct with 'nowrap'. Solution: Do not display "after" text prop on the next line when 'wrap' is off.
2022-09-17patch 9.0.0488: cursor wrong with virtual text "above" and 'showbreak'v9.0.0488Bram Moolenaar
Problem: Cursor in wrong position with virtual text "above" and 'showbreak'. Solution: Take the first character column into account. (closes #11149)
2022-09-14patch 9.0.0464: with virtual text "above" indenting doesn't work wellv9.0.0464Bram Moolenaar
Problem: With virtual text "above" indenting doesn't work well. Solution: Ignore text properties while adjusting indent. (issue #11084)
2022-09-10patch 9.0.0439: cursor wrong if inserting before line with virtual text abovev9.0.0439Bram Moolenaar
Problem: Cursor wrong if inserting before line with virtual text above. Solution: Add the width of the "above" virtual text to the cursor position. (issue #11084)
2022-09-10patch 9.0.0438: cannot put virtual text above a linev9.0.0438Bram Moolenaar
Problem: Cannot put virtual text above a line. Solution: Add the "above" value for "text_align".
2022-09-07patch 9.0.0412: compiler warning for unused argumentv9.0.0412Bram Moolenaar
Problem: Compiler warning for unused argument. Solution: Add UNUSED.
2022-09-07patch 9.0.0410: struct member cts_lnum is unusedv9.0.0410Bram Moolenaar
Problem: Struct member cts_lnum is unused. Solution: Delete it.
2022-08-28patch 9.0.0297: cursor position wrong after right aligned virtual textv9.0.0297Bram Moolenaar
Problem: Cursor position wrong after right aligned virtual text. (Iizuka Masashi) Solution: Take the width of the column offset into account. (closes #10997) Also fix virtual text positioning.
2022-08-23patch 9.0.0247: cannot add padding to virtual text without highlightv9.0.0247Bram Moolenaar
Problem: Cannot add padding to virtual text without highlight. Solution: Add the "text_padding_left" argument. (issue #10906)
2022-08-14patch 9.0.0210: 'list' mode does not work properly with virtual textv9.0.0210Bram Moolenaar
Problem: 'list' mode does not work properly with virtual text. Solution: Show the "$" at the right position. (closes #10913)
2022-08-14patch 9.0.0205: cursor in wrong position when inserting after virtual textv9.0.0205Bram Moolenaar
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-13patch 9.0.0199: cursor position wrong with two right-aligned virtual textsv9.0.0199Bram Moolenaar
Problem: Cursor position wrong with two right-aligned virtual texts. Solution: Add the padding for right-alignment. (issue #10906)
2022-08-09patch 9.0.0179: cursor pos wrong with wrapping virtual text in empty linev9.0.0179Bram Moolenaar
Problem: Cursor position wrong with wrapping virtual text in empty line. Solution: Adjust handling of an empty line. (closes #10875)