Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CLOSED] On last line of file, Duplicate clones text within line instead of adding new line #921

Open
core-ai-bot opened this issue Aug 29, 2021 · 6 comments

Comments

@core-ai-bot
Copy link
Member

Issue by peterflynn
Wednesday May 23, 2012 at 00:03 GMT
Originally opened as adobe/brackets#926


  1. Open a file where the last line does not have a trailing CR (i.e. where the last numbered line is not blank)
  2. Put the cursor on that line
  3. Ctrl+D

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.

@core-ai-bot
Copy link
Member Author

Comment by peterflynn
Wednesday May 23, 2012 at 00:04 GMT


Note: Should add a unit test in EditorCommandHandlers-test whenever this bug is fixed.

@core-ai-bot
Copy link
Member Author

Comment by pthiess
Tuesday May 29, 2012 at 17:42 GMT


Reviewed- leave it open.

@core-ai-bot
Copy link
Member Author

Comment by glortho
Tuesday Jun 26, 2012 at 02:49 GMT


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?

@core-ai-bot
Copy link
Member Author

Comment by peterflynn
Tuesday Jun 26, 2012 at 04:55 GMT


@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.

@core-ai-bot
Copy link
Member Author

Comment by glortho
Tuesday Jun 26, 2012 at 13:25 GMT


Understood,@peterflynn – just seeing where our boundaries are. I'll push the fix for this today (after going through the other contributor pre-reqs).

@core-ai-bot
Copy link
Member Author

Comment by peterflynn
Friday Jul 13, 2012 at 23:25 GMT


I already confirmed this when testing the pull request, so closing straight away

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

No branches or pull requests

1 participant