Skip to content
This repository was archived by the owner on Apr 1, 2020. It is now read-only.

Don't trigger an update when moving cursor after saving - #2422

Closed
cbosdo wants to merge 1 commit into
onivim:masterfrom
cbosdo:master
Closed

Don't trigger an update when moving cursor after saving#2422
cbosdo wants to merge 1 commit into
onivim:masterfrom
cbosdo:master

Conversation

@cbosdo

@cbosdo cbosdo commented Jul 13, 2018

Copy link
Copy Markdown
Contributor

When saving a buffer neovim increments b:changedtick, which causes the
buffer to be refreshed. To avoid this, update b:last_change_tick on
BufWritePost events. Fixes issue #2421

When saving a buffer neovim increments b:changedtick, which causes the
buffer to be refreshed. To avoid this, update b:last_change_tick on
BufWritePost events. Fixes issue onivim#2421
@cbosdo

cbosdo commented Jul 13, 2018

Copy link
Copy Markdown
Contributor Author

I figured out that the following scenario is still broken with linters that only work on saved files:

  • Open a python file with lint warnings or errors (like TODOs)
  • The lint results are properly displayed
  • Change something, like adding a line before the TODO
  • Switch to another window and come back to Oni
  • The lint is rerun with didOpen... which assumes the document is the same than the one on disk: the lint marks are broken.

In such a case we would need to tell apart didOpen on saved files and those on dirty files.

@akinsho

akinsho commented Jul 16, 2018

Copy link
Copy Markdown
Member

@cbosdo thanks for the PR 👍 I think its worth noting that #2330 changes the changed tick functionality (removes it actually) and instead uses the new neovim updates api so it might be worth keeping that in mind as its possible that once that comes in the changes here might no longer apply or might need to be reworked to work with the new setup

@cbosdo

cbosdo commented Jul 17, 2018

Copy link
Copy Markdown
Contributor Author

@akin909 yes @bryphe mentioned that PR to me on Discord, the PR I made is only a temporary fix to wait until his big effort reaches the repo.

@cbosdo

cbosdo commented Jun 20, 2019

Copy link
Copy Markdown
Contributor Author

I don't have time to come back to this PR, closing

@cbosdo cbosdo closed this Jun 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants