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

files.insertFinalNewline should Not Move Cursor to New Line #16557

Closed
mjbvz opened this issue Dec 6, 2016 · 5 comments
Closed

files.insertFinalNewline should Not Move Cursor to New Line #16557

mjbvz opened this issue Dec 6, 2016 · 5 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded
Milestone

Comments

@mjbvz
Copy link
Contributor

mjbvz commented Dec 6, 2016

  • VSCode Version: 1.8 insiders 2016-12-05T07:03:07.371Z
  • OS Version: OSX

Steps to Reproduce

  1. Add setting for "files.insertFinalNewline": true
  2. Create blank file
  3. Type a on first line.
  4. Save file.

Expected
Newline inserted and cursor remains on the same line at the end of a

Actual
dec-05-2016 17-16-38

On each save when a new line is added, the cursor moves to the last line.

@mjbvz
Copy link
Contributor Author

mjbvz commented Dec 6, 2016

This is particularly annoying with "files.autoSave"

@bpasero
Copy link
Member

bpasero commented Dec 6, 2016

@mjbvz up for debate I would say. Here is what Sublime does:

view-picker

Here is what editor config extension does:

view-picker

The latter solves your issue but at first I thought it is a bug that saving results in a selection like that.

Would like to hear more from others before making a move.

@bpasero bpasero added feature-request Request for new features or functionality editor labels Dec 6, 2016
@bpasero bpasero self-assigned this Dec 6, 2016
@bpasero bpasero modified the milestones: Backlog, November 2016 Dec 6, 2016
@bpasero bpasero removed the feature-request Request for new features or functionality label Dec 6, 2016
@jrieken
Copy link
Member

jrieken commented Dec 6, 2016

I agree with @mjbvz and think this is bad

@bpasero
Copy link
Member

bpasero commented Dec 6, 2016

@jrieken would you expect the cursor to just stay or do what editorconfig does?

@jrieken
Copy link
Member

jrieken commented Dec 6, 2016

Newline inserted and cursor remains on the same line at the end of a

stay

@bpasero bpasero closed this as completed in 7c7df17 Dec 7, 2016
@bpasero bpasero added the bug Issue identified by VS Code Team member as probable bug label Dec 7, 2016
@ramya-rao-a ramya-rao-a added the verified Verification succeeded label Dec 8, 2016
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

4 participants