File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -148,16 +148,6 @@ impl Buffer {
148148 }
149149
150150 fn flush_merge_commits ( & mut self ) {
151- // Collect available empty lanes once, before we start maybe filling them.
152- let mut empty_lanes: Vec < usize > = self
153- . current
154- . iter ( )
155- . enumerate ( )
156- . filter_map ( |( index, slot) | {
157- slot. is_none ( ) . then_some ( index)
158- } )
159- . collect ( ) ;
160-
161151 while let Some ( alias) = self . merge_commits . pop ( ) {
162152 // Search for an occupied slot that matches the target alias.
163153 // If found, extract its index and a mutable clone of the chunk.
@@ -184,14 +174,14 @@ impl Buffer {
184174 marker : Markers :: Commit ,
185175 } ;
186176
187- if let Some ( empty_index ) = empty_lanes . pop ( ) {
188- self . record_replace ( empty_index , Some ( new_lane ) ) ;
189- } else {
190- self . record_insert (
191- self . current . len ( ) ,
192- Some ( new_lane ) ,
193- ) ;
194- }
177+ // Always append the merge's second-parent lane to
178+ // the end instead of reusing an existing empty slot,
179+ // so the new visual column does not collapse
180+ // spatial ordering of lanes already in existence.
181+ self . record_insert (
182+ self . current . len ( ) ,
183+ Some ( new_lane ) ,
184+ ) ;
195185 }
196186 }
197187 }
You can’t perform that action at this time.
0 commit comments