From f009ec0f6f214e68eb39650e2b68743f74cdbfd7 Mon Sep 17 00:00:00 2001 From: Marc Bernard <59966492+mbtools@users.noreply.github.com> Date: Fri, 6 Jan 2023 20:04:00 +0100 Subject: [PATCH] Page diff/patch: Follow-up for small files (#5976) --- src/ui/pages/zcl_abapgit_gui_page_diff.clas.abap | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/ui/pages/zcl_abapgit_gui_page_diff.clas.abap b/src/ui/pages/zcl_abapgit_gui_page_diff.clas.abap index bae081ecc..88dc59cd0 100644 --- a/src/ui/pages/zcl_abapgit_gui_page_diff.clas.abap +++ b/src/ui/pages/zcl_abapgit_gui_page_diff.clas.abap @@ -1025,13 +1025,10 @@ CLASS zcl_abapgit_gui_page_diff IMPLEMENTATION. " Get line where diff really starts READ TABLE lt_diffs ASSIGNING INDEX lv_tabix + 8. IF sy-subrc <> 0. - IF 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 INDEX lv_tabix. - ENDIF. + " Occurs only for small files/diffs with less than 8 lines. + " Therefore let's use the first line as beacon + ASSIGN TO . ASSERT IS ASSIGNED. - ASSIGN TO . ENDIF. ri_html->add( render_beacon( is_diff_line = is_diff = is_diff ) ). @@ -1042,9 +1039,9 @@ CLASS zcl_abapgit_gui_page_diff IMPLEMENTATION. -new = lo_highlighter->process_line( -new ). -old = lo_highlighter->process_line( -old ). ELSE. - -new = escape( val = -new + -new = escape( val = -new format = cl_abap_format=>e_html_attr ). - -old = escape( val = -old + -old = escape( val = -old format = cl_abap_format=>e_html_attr ). ENDIF.