[vim/vim] autoindent corrupts setline content on <Esc> (PR #20290)

1 view
Skip to first unread message

glepnir

unread,
7:03 AM (3 hours ago) 7:03 AM
to vim/vim, Subscribed

Problem:
with autoindent may delete whitespace from text added to the line by setline during Insert (e.g. from or CursorHoldI): "v v" becomes "vv".

Solution:
Only strip autoindent whitespace when the rest of the line is all whitespace.

Fix #19363


You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/20290

Commit Summary

  • 978d898 autoindent corrupts setline content on <Esc>

File Changes

(2 files)

Patch Links:


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20290@github.com>

zeertzjq

unread,
7:09 AM (2 hours ago) 7:09 AM
to vim/vim, Subscribed

@zeertzjq commented on this pull request.


In src/edit.c:

> +		    if (gchar_cursor() == NUL && curwin->w_cursor.col > 0)
+			--curwin->w_cursor.col;

This seems no longer needed.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20290/review/4344888771@github.com>

Christian Brabandt

unread,
7:17 AM (2 hours ago) 7:17 AM
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#20290)

Thanks, looks better than my version


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20290/c4518164699@github.com>

glepnir

unread,
7:32 AM (2 hours ago) 7:32 AM
to vim/vim, Push

@glepnir pushed 1 commit.

  • 01a6e5a autoindent corrupts setline content on <Esc>


View it on GitHub or unsubscribe.


Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20290/before/978d8988dbadd1bac7164e0817dd01a13074d34c/after/01a6e5a1831eb118e7ad74b9c03fed244ff9f698@github.com>

Reply all
Reply to author
Forward
0 new messages