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
else
self.relative_position = self.class.position_between(max_pos, MAX_POSITION + 1)
end
rescue NoSpaceLeft
self.relative_position = MAX_POSITION
end
def move_to_start
......@@ -326,6 +328,8 @@ module RelativePositioning
else
self.relative_position = self.class.position_between(MIN_POSITION - 1, min_pos)
end
rescue NoSpaceLeft
self.relative_position = MIN_POSITION
end
# 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