question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

v0.3.4 highlights final newline after save

See original GitHub issue

Steps to reproduce

  1. Open a file for which insert_final_newline = true.
  2. Place your cursor at the end of the file w/o a final newline.
  3. Save the file.

Expected Behavior

A final newline is inserted and the cursor moves to the end of the file.

Note: I’m not sure what should happen with multiple cursors. Open to suggestions.

Actual Behavior

A final newline is inserted; however, it’s also highlighted. Furthermore, the cursor remains where it was before the save.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
SamVerschuerencommented, Oct 19, 2016

unless you listen for the onDidSaveTextDocument event

That’s how it should be done. https://github.com/SamVerschueren/vscode-final-newline/blob/master/extension.ts#L65

0reactions
jednanocommented, Mar 12, 2017

Fixed and published in version 0.6.2!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Visual Studio Code — Insert Newline at the End of Files
Select the checkbox under the heading 'Files: Insert Final Newline' in the 'Workspace Settings' and/or 'User Settings' tab(s) as required.
Read more >
kiro-editor - crates.io: Rust Package Registry
kiro-editor v0.3.4 ... Open/Save text files; Create new text files and empty text buffer on memory ... Finally a user adds a new...
Read more >
volar/CHANGELOG.md at master - GitHub
normalizeComponentAutoImportName setting to support remove Vue ending for component ... fix: hover info cannot show after save document (#1880 (comment)) ...
Read more >
The Archive: Release Notes - Zettelkasten.de
New: When all windows are closed, the Saved Searches shortcuts will open a new ... Fixed: Background colors of e.g. inline code right...
Read more >
Overseer - Go Packages
Call Status after the command finishes to get its final status. ... Write when the internal line buffer is filled before a newline...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found