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

Two empty lines at EOF with ensure_newline_at_eof_on_save and trim_trailing_white_space_on_save enabled #1762

Closed
inta opened this issue Jun 14, 2017 · 7 comments

Comments

@inta
Copy link

inta commented Jun 14, 2017

Summary

Given the cursor is on the last line of the file and there is white space before the cursor. When I save the file the white space is removed, but there is also a new empty line added. So after saving there are two empty lines at the end of the file.

Expected behavior

  • white space gets removed
  • there is one empty line at the end of the file

Actual behavior

  • white space gets removed
  • empty line is appended
  • there are two empty lines at the end of the file

Steps to reproduce

  1. set ensure_newline_at_eof_on_save to true
  2. set trim_trailing_white_space_on_save to true
  3. go to the end of any file
  4. enter some white space (space or tab)
  5. save the file

Environment

  • Operating system and version:
    • Linux: Debian 9 Stretch (testing)
  • Monitor:
    • Resolution 1920x1200
    • dpi_scale no idea where to check it, but it is not set in settings
  • Sublime Text:
    • Build 3126
    • 64 bit

This issue is reproducible in reverted/clean state.

@keith-hall
Copy link
Collaborator

Also confirmed on Windows (7 with ST 3136 x64).

@keith-hall
Copy link
Collaborator

possible duplicate of #263

@FichteFoll
Copy link
Collaborator

Looks like a duplicate to me.

@inta
Copy link
Author

inta commented Jun 14, 2017

Yes, I think it is a duplicate. I did not find the other issue by searching for "ensure_newline_at_eof_on_save", sorry.

@FichteFoll
Copy link
Collaborator

FichteFoll commented Aug 9, 2017

Closing as a duplicate of #263.

Actually, I consider this issue to be more precise so I'm closing the other issue instead.

@keith-hall
Copy link
Collaborator

this may have been fixed in 3189, as the functionality has been moved from a Python module to core. I can't replicate it any more.

@FichteFoll
Copy link
Collaborator

FichteFoll commented Feb 1, 2019

Can confirm I am not observing this issue anymore. 🎉

See #2600.

@FichteFoll FichteFoll added this to the Build 3189 milestone Feb 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants