Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

indentation being changed on paste despite auto indent on paste unchecked #10407

Closed
pknowles opened this issue Jan 14, 2016 · 4 comments
Closed

Comments

@pknowles
Copy link

I have both Editor Settings->Auto Indent and Editor Settings->Auto Indent On Paste unchecked and start with a new plain text file (using hard tabs):

one
    two

where two is indented with a tab. I place the cursor at the end of two, hold shift, press up and copy the selection. This should copy a newline character, a tab character and the word two, i.e. "\n\ttwo". Then I paste, and get this:

one
    two
        two

somehow an extra tab has been injected. Additional pasting increases the indentation even further! I expected this:

one
    two
    two

Interestingly, if one is also indented before copying, the correct behaviour is observed. It's as though atom is counting the difference in indentation between the lines selected when the text is copied. Personally I hate anything that tries to be too fancy and automatic, and it is far more frustrating to me than the times when something could have predicted what I wanted and didn't.

@amytruong amytruong added the bug label Jan 14, 2016
@amytruong
Copy link

Was able to reproduce this. Thanks @pknowles!

Aakash1312 added a commit to Aakash1312/atom that referenced this issue Jan 21, 2016
indentation being changed on paste despite auto indent on paste unchecked. 
atom#10407
@Bulat-Ziganshin
Copy link

seems this is a dup and can be closed: atom/language-clojure#34

@pknowles
Copy link
Author

Still experience this in 1.7.2. There's also another effect which seems to be related:

»   /**
»   ·* hello
»   ·* world
»   ·*/
»   void hello()

Selecting one line up from the end of hello() to include the newline, then pasting at the end of hello() gives the wrong indentation. In fact it gives spaces.

»   /**
»   ·* hello
»   ·* world
»   ·*/
»   void hello()
···void hello()

@lock
Copy link

lock bot commented Mar 30, 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 and limited conversation to collaborators Mar 30, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants