Skip to content

Fix boundary case behavior for buffer movement (Circular rotation)#526

Open
raindealer wants to merge 1 commit intoNvChad:v3.0from
raindealer:v3.0
Open

Fix boundary case behavior for buffer movement (Circular rotation)#526
raindealer wants to merge 1 commit intoNvChad:v3.0from
raindealer:v3.0

Conversation

@raindealer
Copy link

Hello! I often use your plugin, and the current boundary case behavior is a bit annoying. When moving the first buffer to the left or the last buffer to the right, we shouldn't just swap their places. Instead, we should move the first element to the very end (or vice versa) without swapping it with the neighbor.

Current behavior (Simple Swap):
State 1: image
State 2: image

  1. I move from (State 1) first tab to the left
  2. We have state (State 2) where last and first swap places
  3. Move from (State 2) to the right, produce (State 1)...

New behavior (Circular Rotation):
State 1: image
State 2:
image

Attention on the second and pre-last elements the entire list shifts to maintain order.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant