mirror of
https://github.com/go-delve/delve.git
synced 2025-10-29 01:27:16 +08:00
Handle 'next'ing in deferred funcs
This commit is contained in:
@ -196,7 +196,7 @@ func (s *Searcher) NextLines(fname string, line int) (lines []int, err error) {
|
||||
return true
|
||||
}
|
||||
|
||||
if dn, ok := n.(*ast.DeferStmt); ok {
|
||||
if dn, ok := n.(*ast.DeferStmt); ok && line < pos.Line {
|
||||
endpos := s.fileset.Position(dn.End())
|
||||
deferEndLine = endpos.Line
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user