Skip to content

Conversation

tejasvi
Copy link

@tejasvi tejasvi commented Jan 26, 2022

Update only the lines which need updating. Prevents unnecessary computations for plugins which listen to buffer change events given the common case is typing already formatted code.

Update only the lines which need updating. Prevents unnecessary computations for plugins which listen to buffer change events.
@rhysd
Copy link
Owner

rhysd commented Feb 3, 2022

I think this would cause performance issue when the source is very large (>10000 lines). Checking string and calling setline() which triggers buffer change event at each line. I don't know what 'unnecessary computations for plugins' means exactly, but how about adding :noautocmd to :execute?

execute 'noautocmd' len(splitted) .',$delete' '_'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants