mirror of
https://github.com/abapGit/abapGit.git
synced 2025-05-01 12:20:51 +08:00
only highlight abap files, close #482
This commit is contained in:
parent
b1e35d75b0
commit
5f08a635ea
|
@ -3,7 +3,7 @@ REPORT zabapgit LINE-SIZE 100.
|
|||
* See http://www.abapgit.org
|
||||
|
||||
CONSTANTS: gc_xml_version TYPE string VALUE 'v1.0.0', "#EC NOTEXT
|
||||
gc_abap_version TYPE string VALUE 'v1.24.1'. "#EC NOTEXT
|
||||
gc_abap_version TYPE string VALUE 'v1.24.2'. "#EC NOTEXT
|
||||
|
||||
********************************************************************************
|
||||
* The MIT License (MIT)
|
||||
|
|
|
@ -261,6 +261,7 @@ CLASS lcl_gui_page_diff IMPLEMENTATION.
|
|||
lv_remote TYPE string,
|
||||
lv_lattr TYPE string,
|
||||
lv_rattr TYPE string,
|
||||
lv_highlight TYPE abap_bool,
|
||||
lv_insert_nav TYPE abap_bool.
|
||||
|
||||
FIELD-SYMBOLS <ls_diff> LIKE LINE OF lt_diffs.
|
||||
|
@ -270,6 +271,8 @@ CLASS lcl_gui_page_diff IMPLEMENTATION.
|
|||
|
||||
lt_diffs = is_diff-o_diff->get( ).
|
||||
|
||||
lv_highlight = boolc( is_diff-filename CP '*.abap' ).
|
||||
|
||||
LOOP AT lt_diffs ASSIGNING <ls_diff>.
|
||||
IF <ls_diff>-short = abap_false.
|
||||
lv_insert_nav = abap_true.
|
||||
|
@ -282,11 +285,19 @@ CLASS lcl_gui_page_diff IMPLEMENTATION.
|
|||
ENDIF.
|
||||
|
||||
IF is_diff-mod = c_mod-remote. " Remote file leading changes
|
||||
lv_local = lo_highlighter->process_line( <ls_diff>-old ).
|
||||
lv_remote = lo_highlighter->process_line( <ls_diff>-new ).
|
||||
lv_local = <ls_diff>-old.
|
||||
lv_remote = <ls_diff>-new.
|
||||
ELSE. " Local leading changes or both were modified
|
||||
lv_local = lo_highlighter->process_line( <ls_diff>-new ).
|
||||
lv_remote = lo_highlighter->process_line( <ls_diff>-old ).
|
||||
lv_local = <ls_diff>-new.
|
||||
lv_remote = <ls_diff>-old.
|
||||
ENDIF.
|
||||
|
||||
IF lv_highlight = abap_true.
|
||||
lv_local = lo_highlighter->process_line( lv_local ).
|
||||
lv_remote = lo_highlighter->process_line( lv_remote ).
|
||||
ELSE.
|
||||
lv_local = escape( val = lv_local format = cl_abap_format=>e_html_attr ).
|
||||
lv_remote = escape( val = lv_remote format = cl_abap_format=>e_html_attr ).
|
||||
ENDIF.
|
||||
|
||||
get_line_hl( EXPORTING iv_mod = is_diff-mod
|
||||
|
|
Loading…
Reference in New Issue
Block a user