mirror of
https://github.com/neovim/neovim.git
synced 2025-10-06 01:46:29 +00:00
vim-patch:9.1.0138: too many STRLEN calls when getting a memline (#27799)
Problem: too many STRLEN calls when getting a memline
Solution: Optimize calls to STRLEN(), add a few functions in memline.c
that return the byte length instead of relying on STRLEN()
(John Marriott)
closes: vim/vim#14052
02d7a6c6cf
Cherry-pick line break changes from patch 8.1.0226.
Cherry-pick ml_line_len from patch 8.1.0579.
Cherry-pick test_comments.vim change from patch 9.1.0153.
Co-authored-by: John Marriott <basilisk@internode.on.net>
This commit is contained in:
@@ -86,8 +86,7 @@ void internal_format(int textwidth, int second_indent, int flags, bool format_on
|
||||
|
||||
// When 'ai' is off we don't want a space under the cursor to be
|
||||
// deleted. Replace it with an 'x' temporarily.
|
||||
if (!curbuf->b_p_ai
|
||||
&& !(State & VREPLACE_FLAG)) {
|
||||
if (!curbuf->b_p_ai && !(State & VREPLACE_FLAG)) {
|
||||
cc = gchar_cursor();
|
||||
if (ascii_iswhite(cc)) {
|
||||
save_char = (char)cc;
|
||||
|
Reference in New Issue
Block a user