@@ -119,7 +119,9 @@ contains |
| 119 | 119 | integer :: mid_col, mid_row, max_lines, preview_max_lines |
| 120 | 120 | character(len=:), allocatable, dimension(:) :: incoming_view, local_view, preview_view |
| 121 | 121 | integer :: n_incoming, n_local, n_preview |
| 122 | | - integer :: conflict_start, conflict_end |
| 122 | + integer :: incoming_start, incoming_end |
| 123 | + integer :: local_start, local_end |
| 124 | + integer :: preview_start, preview_end |
| 123 | 125 | |
| 124 | 126 | mid_col = term_cols / 2 |
| 125 | 127 | mid_row = max(10, int((term_rows - 2) * 0.4)) |
@@ -130,11 +132,11 @@ contains |
| 130 | 132 | call draw_layout(term_rows, term_cols, pane%active_pane) |
| 131 | 133 | |
| 132 | 134 | ! Get side views - show incoming/local for current conflict, all others resolved |
| 133 | | - call get_side_view(conflicts, n_conflicts, current, 1, incoming_view, n_incoming, conflict_start, conflict_end) |
| 134 | | - call get_side_view(conflicts, n_conflicts, current, 2, local_view, n_local, conflict_start, conflict_end) |
| 135 | + call get_side_view(conflicts, n_conflicts, current, 1, incoming_view, n_incoming, incoming_start, incoming_end) |
| 136 | + call get_side_view(conflicts, n_conflicts, current, 2, local_view, n_local, local_start, local_end) |
| 135 | 137 | |
| 136 | 138 | ! Get full preview with ALL conflicts resolved |
| 137 | | - call get_full_preview(conflicts, n_conflicts, current, preview_view, n_preview, conflict_start, conflict_end) |
| 139 | + call get_full_preview(conflicts, n_conflicts, current, preview_view, n_preview, preview_start, preview_end) |
| 138 | 140 | |
| 139 | 141 | ! Update pane max lines |
| 140 | 142 | pane%max_lines_incoming = n_incoming |
@@ -146,17 +148,17 @@ contains |
| 146 | 148 | call clear_pane(3, mid_row - 1, mid_col + 1, term_cols) |
| 147 | 149 | call clear_pane(mid_row + 2, term_rows - 2, 1, term_cols) |
| 148 | 150 | |
| 149 | | - ! Draw scrollable panes |
| 151 | + ! Draw scrollable panes - each with its own conflict region |
| 150 | 152 | call draw_scrollable_pane(incoming_view, n_incoming, 2, mid_col - 4, 4, max_lines, & |
| 151 | | - pane%scroll_incoming, conflict_start, conflict_end, & |
| 153 | + pane%scroll_incoming, incoming_start, incoming_end, & |
| 152 | 154 | pane%active_pane == PANE_INCOMING, 1) |
| 153 | 155 | |
| 154 | 156 | call draw_scrollable_pane(local_view, n_local, mid_col + 2, term_cols - mid_col - 2, 4, max_lines, & |
| 155 | | - pane%scroll_local, conflict_start, conflict_end, & |
| 157 | + pane%scroll_local, local_start, local_end, & |
| 156 | 158 | pane%active_pane == PANE_LOCAL, 2) |
| 157 | 159 | |
| 158 | 160 | call draw_scrollable_pane(preview_view, n_preview, 2, term_cols - 4, mid_row + 2, preview_max_lines, & |
| 159 | | - pane%scroll_preview, conflict_start, conflict_end, & |
| 161 | + pane%scroll_preview, preview_start, preview_end, & |
| 160 | 162 | pane%active_pane == PANE_PREVIEW, 3) |
| 161 | 163 | |
| 162 | 164 | ! Draw conflict counter |