File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -264,7 +264,7 @@ local function parse_java_stack_trace_line_in_lines(lines, line)
264264 end
265265 end
266266
267- return nil
267+ return nil , nil , nil
268268end
269269
270270--- @param lines TextLines The lines to search for first line in
@@ -356,11 +356,10 @@ local function parse_java_stack_around_line(lines, cursor_line)
356356 if element then
357357 if not is_same_stack_track_element (element , prev_element ) then
358358 table.insert (stack_elements , insert_index , element )
359+ insert_index = insert_index + 1
359360 prev_element = element
360361 end
361362
362- insert_index = insert_index + 1
363-
364363 if cursor_line >= first_line and cursor_line <= last_line then
365364 cursor_line_element = element
366365 end
@@ -391,11 +390,13 @@ local function parse_java_stack_around_line(lines, cursor_line)
391390
392391 if cursor_line_element then
393392 for index , element in ipairs (stack_elements ) do
394- if element == cursor_line_element then
393+ if is_same_stack_track_element ( element , cursor_line_element ) then
395394 cursor_line_index = index
396395 break
397396 end
398397 end
398+
399+ assert (cursor_line_index )
399400 end
400401
401402 return stack_elements , cursor_line_index
You can’t perform that action at this time.
0 commit comments