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

请问这里的索引是否应该是 $i - 1 ? #28

Closed
Saltedf opened this issue Apr 6, 2023 · 1 comment
Closed

请问这里的索引是否应该是 $i - 1 ? #28

Saltedf opened this issue Apr 6, 2023 · 1 comment

Comments

@Saltedf
Copy link

Saltedf commented Apr 6, 2023

push @result, [ $prev_file, $prev_lineno, $three_parts[$i][1], $prev_line ];

如果我没理解错的话, 这里的四元组中的第三个元素是函数定义的最后一行, 按这样理解这里的一行应该是:

 push @result, [ $prev_file, $prev_lineno, $three_parts[$i-1][1], $prev_line ]; 

否则将会产生下面这样的四元组:

jute/inc/EIndex.hh, 32, 24,        virtual ~EIndex() {} 

而修改后:

jute/inc/EIndex.hh, 32, 32,        virtual ~EIndex() {} 
@satanson
Copy link
Owner

satanson commented Apr 8, 2023

@Saltedf merge_lines_multiline_break_disabled 这个函数, 存在这样的问题. 后续在ag中,增加了multiline-break之后, 该函数不在使用. 你可以尝试一下https://github.com/satanson/the_silver_searcher.

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