func (f *auto_complete_file) cursor_in_if_stmt(s *ast.IfStmt) bool { if f.cursor > f.offset(s.If) { // magic -10 comes from auto_complete_file.offset method, see // len() expr in there if f.offset(s.End()) == -10 || f.cursor < f.offset(s.End()) { return true } } return false }