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

Toggle line comments on blank line indents with spaces instead of tabs #16193

Closed
AlexWayfer opened this Issue Nov 15, 2017 · 2 comments

Comments

Projects
None yet
3 participants
@AlexWayfer

AlexWayfer commented Nov 15, 2017

Prerequisites

Description

After the fix of the #15850, I guess, editor:toggle-line-comments works incorrectly in tab-indented file on empty indented lines.

Steps to Reproduce

  1. Open file with tab-based indentation
  2. Go to the empty line
  3. Indent
  4. Run editor:toggle-line-comments (ctrl-/)

Expected behavior: Line indented by tabs (like the rest of the file) and starts with comment symbol(s).

» » foo
» » #·

Actual behavior: Indentation becomes by spaces.

» » foo
····#·

Reproduces how often: 100%

Versions

$ atom --version
Atom    : 1.22.0
Electron: 1.6.15
Chrome  : 56.0.2924.87
Node    : 7.4.0

$ apm --version
apm  1.18.8
npm  3.10.10
node 6.9.5 x64
python 2.7.14
git 2.15.0

Additional Information

No.

@rsese

This comment has been minimized.

Show comment
Hide comment
@rsese

rsese Nov 16, 2017

Member

Thanks for the report, I can reproduce on Atom 1.22.1 with macOS 10.12.6 - with this snippet indented by tabs and Settings > Editor > Tab Type set to hard:

var hi = function() {
	console.log("hi");
	
	console.log("bye");
}

On 1.22.1:

toggle-line-comments-1 22 1

Previous behavior in 1.21.1:

toggle-line-comments-1 21 1

Member

rsese commented Nov 16, 2017

Thanks for the report, I can reproduce on Atom 1.22.1 with macOS 10.12.6 - with this snippet indented by tabs and Settings > Editor > Tab Type set to hard:

var hi = function() {
	console.log("hi");
	
	console.log("bye");
}

On 1.22.1:

toggle-line-comments-1 22 1

Previous behavior in 1.21.1:

toggle-line-comments-1 21 1

@lock

This comment has been minimized.

Show comment
Hide comment
@lock

lock bot Jun 2, 2018

This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!

lock bot commented Jun 2, 2018

This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!

@lock lock bot locked as resolved and limited conversation to collaborators Jun 2, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.