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

E684: list index out of range: 2 Error detected while processing function ctrlsf#Save..ctrlsf#edit#Save..<SNR>140_SaveFile..<SNR>140 _VerifyConsistent #55

Closed
hungrybirder opened this issue Jul 28, 2015 · 3 comments

Comments

@hungrybirder
Copy link

在使用中,发现如下ERROR

image

image

然后Ctrl-j跳转第一个welcome上,再使用multicursor,将三个文件中的welcome更新到Welcome
再保存 :w

image

image

image

image

image

image

文件更新是成功的,就出现如下ERROR了,可以避免吗?

@dyng
Copy link
Owner

dyng commented Jul 29, 2015

这是一个已知的ag的bug。

问题出在如果文件行尾有LF时,ag输出的结果会包含一个空行(在你的例子中,a.txt只有2行,但是ag的结果却有3行),所以导致写入时超出了buffer的长度。

ggreer/the_silver_searcher#685
我已经向ag项目报告了这个bug,不过目前还未得到处理。

一个临时的解决办法是换用ack,ack在我测试的版本中没有这个bug。
根本的解决办法自然是ag解决这个bug,不过如果实在得不到解决就只能在ctrlsf里面work around掉。

@hungrybirder
Copy link
Author

多谢及时回复,我先小忍下吧

@dyng
Copy link
Owner

dyng commented Aug 20, 2015

Close in favor of #64

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