Commit d1a6ff1d authored by Alex Kalderimis's avatar Alex Kalderimis

Suppress NoSpaceLeft when moving to start/end

this comes at the cost of less-than-correct behaviour

See: https://gitlab.com/gitlab-org/gitlab/-/issues/238416
parent b6c8fa60
...@@ -311,6 +311,8 @@ module RelativePositioning ...@@ -311,6 +311,8 @@ module RelativePositioning
else else
self.relative_position = self.class.position_between(max_pos, MAX_POSITION + 1) self.relative_position = self.class.position_between(max_pos, MAX_POSITION + 1)
end end
rescue NoSpaceLeft
self.relative_position = MAX_POSITION
end end
def move_to_start def move_to_start
...@@ -326,6 +328,8 @@ module RelativePositioning ...@@ -326,6 +328,8 @@ module RelativePositioning
else else
self.relative_position = self.class.position_between(MIN_POSITION - 1, min_pos) self.relative_position = self.class.position_between(MIN_POSITION - 1, min_pos)
end end
rescue NoSpaceLeft
self.relative_position = MIN_POSITION
end end
# Moves the sequence before the current item to the middle of the next gap # Moves the sequence before the current item to the middle of the next gap
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment