-
Notifications
You must be signed in to change notification settings - Fork 7.6k
On last line of file, Duplicate clones text within line instead of adding new line #926
Comments
Note: Should add a unit test in EditorCommandHandlers-test whenever this bug is fixed. |
Reviewed- leave it open. |
Oy, the codemirror.js code needs serious help. Frequently called anonymous functions with nested function definitions inside them, for starters. Double whammy. Is it fair game to modify this code or would we need to patch it through external overrides/scrubbing since it's third party? |
@jedverity: We generally try to keep churn to CodeMirror low. We're also trying to move to a workflow where we submit changes to the main CodeMirror repo first, then pull them into Brackets. However, for this particular bug the behavior in question is implemented in Brackets code: EditorCommandHandlers.js. So I don't think any CodeMirror changes should be necessary. |
Understood, @peterflynn – just seeing where our boundaries are. I'll push the fix for this today (after going through the other contributor pre-reqs). |
Fix bug #926: amend duplicateText() to handle end-of-file scenarios, with unit test
I already confirmed this when testing the pull request, so closing straight away |
Result: The text on the line is doubled (e.g. "abc;" -> "abc;abc;"). No new lines are added.
Expected: A new line is added cloning the line with the cursor on it, just like Ctrl+D on any earlier line in the file. This is how other editors work.
The text was updated successfully, but these errors were encountered: