Skip to content
This repository has been 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
wants to merge 1 commit into from

Conversation

cbosdo
Copy link
Contributor

@cbosdo cbosdo commented Jul 13, 2018

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
Copy link
Contributor Author

cbosdo commented Jul 13, 2018

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
Copy link
Member

akinsho commented Jul 16, 2018

@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
Copy link
Contributor Author

cbosdo commented Jul 17, 2018

@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
Copy link
Contributor Author

cbosdo commented Jun 20, 2019

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