Atom: Toggle line comments on blank line indents with spaces instead of tabs

Created on 15 Nov 2017  Â·  2Comments  Â·  Source: atom/atom

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.

bug regression triaged

Most helpful comment

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

All 2 comments

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

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!

Was this page helpful?
0 / 5 - 0 ratings