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

Incorrect complain about file has been changed since last search #58

Closed
tex opened this issue Aug 5, 2015 · 8 comments
Closed

Incorrect complain about file has been changed since last search #58

tex opened this issue Aug 5, 2015 · 8 comments

Comments

@tex
Copy link

tex commented Aug 5, 2015

Hi, this is a great plugin, but this error makes it not very usefull.

It is inside a git repository and I know for sure that file has not been modified since last search. Also running CtrlsfUpdate doesn't help since it shows exactly the same result and also editing and writing fails with the same error.

File ... has been changed since last search. Skip this file. Please run :CtrlsfUpdate to update your search result.
d since last search. Skip this file. Please run :CtrlsfUpdate to update your search result.
0 files are saved (1 skipped).

dyng added a commit that referenced this issue Aug 5, 2015
@dyng
Copy link
Owner

dyng commented Aug 5, 2015

There are several reasons can mess up CtrlSF's saving. I need more information to debug.

Please update to latest version, and turn on debug mode by let g:ctrlsf_debug_mode = 1.

Keep an eye on message of InconsistentContent, which contains hints about which line has been changed externally, content of that line in memory and on disk. Please check what's wrong with them.

If you can't figure out what is going wrong, report here. And also with your system's information, like

  • os
  • vim's version
  • backend (ag or ack?), its version

@tex
Copy link
Author

tex commented Aug 6, 2015

I found the reason. It is about different line endings. That ^M thing when Windows file is opened in Linux... Not sure how to fix it... Do you think it is a good idea to add option to ignore whitespace changes in InconsistenContent check?

@dyng
Copy link
Owner

dyng commented Aug 7, 2015

Thank you for your helpful bug report, I have fixed this bug in #59 .

It will be soon merged into master as v1.2.

@dyng
Copy link
Owner

dyng commented Aug 9, 2015

The fix has been merged into master.

I'll close this issue. But if you find the fix has not actually fixed, feel free to reopen this.

@dyng dyng closed this as completed Aug 9, 2015
@tex
Copy link
Author

tex commented Aug 11, 2015

I tried it on rather large number of files:

Chyba při zpracování function ctrlsf#Save..ctrlsf#edit#Save..156_SaveFile..156_VerifyConsistent:
řádek 6:
E684: list index out of range: 84
E15: Chybný výraz: line.content !=# a:on_disk[ln-1]
Chyba při zpracování function ctrlsf#Save..ctrlsf#edit#Save..156_SaveFile..156_WriteParagraph:
řádek 34:
E684: list index out of range: 84
Chyba při zpracování function ctrlsf#Save..ctrlsf#edit#Save..156_SaveFile..156_VerifyConsistent:
řádek 6:
E684: list index out of range: 61
E15: Chybný výraz: line.content !=# a:on_disk[ln-1]
Chyba při zpracování function ctrlsf#Save..ctrlsf#edit#Save..156_SaveFile..156_WriteParagraph:
řádek 34:
E684: list index out of range: 61
23 files are saved.

@tex
Copy link
Author

tex commented Aug 11, 2015

Most files are saved correctly as the last line states.

@dyng
Copy link
Owner

dyng commented Aug 11, 2015

It's a known issue related to ag, which I have reported to ag project:

ggreer/the_silver_searcher#685

But if it's hard to be fixed in ag upstream, the only way is to workaround it in CtrlSF. I'll create a new issue about it. Thank you for your report.

@tex
Copy link
Author

tex commented Aug 11, 2015

Thank hou for great plugin! It is awesome!

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

No branches or pull requests

2 participants