diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-12-22 22:45:35 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-22 22:45:35 +0100 |
commit | 98d871b6f9c97485ff01eae5e01c8a0177563554 (patch) | |
tree | e4ae0d41971ca026b23ae8a0e5c8f39eadeb6cdb /editor/plugins | |
parent | ecc5c275f45f455f944ba0e4171c1ed9c930f1a7 (diff) | |
parent | 7ef09ea88fd752f960e04297acc756f2c3c588e3 (diff) |
Merge pull request #70459 from twaritwaikar/fix-split-diff
VCS: Fix split diff's overlapping fields
Diffstat (limited to 'editor/plugins')
-rw-r--r-- | editor/plugins/version_control_editor_plugin.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/editor/plugins/version_control_editor_plugin.cpp b/editor/plugins/version_control_editor_plugin.cpp index f54bebfd8e..e9c6184d73 100644 --- a/editor/plugins/version_control_editor_plugin.cpp +++ b/editor/plugins/version_control_editor_plugin.cpp @@ -594,7 +594,6 @@ void VersionControlEditorPlugin::_display_diff(int p_idx) { diff->pop(); diff->pop(); - diff->add_newline(); diff->push_font(EditorNode::get_singleton()->get_gui_base()->get_theme_font(SNAME("status_source"), SNAME("EditorFonts"))); for (int j = 0; j < diff_file.diff_hunks.size(); j++) { EditorVCSInterface::DiffHunk hunk = diff_file.diff_hunks[j]; @@ -604,6 +603,7 @@ void VersionControlEditorPlugin::_display_diff(int p_idx) { String old_lines = String::num_int64(hunk.old_lines); String new_lines = String::num_int64(hunk.new_lines); + diff->add_newline(); diff->append_text("[center]@@ " + old_start + "," + old_lines + " " + new_start + "," + new_lines + " @@[/center]"); diff->add_newline(); @@ -616,7 +616,6 @@ void VersionControlEditorPlugin::_display_diff(int p_idx) { break; } diff->add_newline(); - diff->add_newline(); } diff->pop(); @@ -684,12 +683,10 @@ void VersionControlEditorPlugin::_display_diff_split_view(List<EditorVCSInterfac if (diff_line.old_line_no >= 0) { diff->push_cell(); - diff->push_indent(1); diff->push_color(has_change ? red : white); diff->add_text(String::num_int64(diff_line.old_line_no)); diff->pop(); diff->pop(); - diff->pop(); diff->push_cell(); diff->push_color(has_change ? red : white); @@ -716,12 +713,10 @@ void VersionControlEditorPlugin::_display_diff_split_view(List<EditorVCSInterfac if (diff_line.new_line_no >= 0) { diff->push_cell(); - diff->push_indent(1); diff->push_color(has_change ? green : white); diff->add_text(String::num_int64(diff_line.new_line_no)); diff->pop(); diff->pop(); - diff->pop(); diff->push_cell(); diff->push_color(has_change ? green : white); |