Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parsimonious buffer updates #122

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Parsimonious buffer updates #122

wants to merge 1 commit into from

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.

None yet

2 participants