Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

Fixes #11848 Moving line up without line ending #12946

Merged

Conversation

jamsinclair
Copy link

@jamsinclair jamsinclair commented Oct 11, 2016

Bug

Fixes the bug described in issue #11848

move-line-up-bug

Fix

From what I explored it looks like a previous dev has tried to fix this bug. Although because rows are 0 indexed, to select the penultimate row for the range it requires using -2.

I wonder whether it's worth rewriting the line:

lines += '\n' unless lines[lines.length - 1] is '\n'

I've attempted to add a valid test. Suggestions to improve or better represent the test welcome 😸

move-line-up-fix

@borishere
Copy link

Just why this is not yet merged??

@lee-dohm
Copy link
Contributor

Thanks for this!

@lee-dohm lee-dohm merged commit 1559c8a into atom:master May 13, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants