Page diff/patch: Follow-up for small files (#5976)

This commit is contained in:
Marc Bernard 2023-01-06 20:04:00 +01:00 committed by GitHub
parent 8e05c34287
commit f009ec0f6f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1025,13 +1025,10 @@ CLASS zcl_abapgit_gui_page_diff IMPLEMENTATION.
" Get line where diff really starts
READ TABLE lt_diffs ASSIGNING <ls_diff_line> INDEX lv_tabix + 8.
IF sy-subrc <> 0.
IF <ls_diff_line> IS NOT ASSIGNED.
" Occurs only for small files/diffs with less than 8 lines.
" Therefore let's use the first line as beacon
READ TABLE lt_diffs ASSIGNING <ls_diff_line> INDEX lv_tabix.
ENDIF.
ASSIGN <ls_diff> TO <ls_diff_line>.
ASSERT <ls_diff_line> IS ASSIGNED.
ASSIGN <ls_diff_line> TO <ls_diff>.
ENDIF.
ri_html->add( render_beacon( is_diff_line = <ls_diff_line>
is_diff = is_diff ) ).