Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Pasting code below a completed form indents the pasted code if the last line of the completed form is indented #34

Open
WalterGR opened this issue Jan 2, 2016 · 1 comment · May be fixed by #49

Comments

@WalterGR
Copy link

WalterGR commented Jan 2, 2016

Repro:

  1. Open or create a .clj file.
  2. Enter a complete form in which the last line is indented, such as the following:
(defn index-of-any [pred coll]
  (first (index-filter pred coll)))
  1. Copy some lines of code.
  2. Position the cursor on the first column of any line after the completed form, such as here:
(defn index-of-any [pred coll]
  (first (index-filter pred coll)))


_
  1. Paste.

Expected:

Pasted lines of code are not indented. For example:

(defn index-of-any [pred coll]
  (first (index-filter pred coll)))


(foo)
(bar)

Actual:

Pasted lines of code are indented to the same level as the final line of the completed form.

(defn index-of-any [pred coll]
  (first (index-filter pred coll)))


  (foo)
  (bar)
@oakmac
Copy link

oakmac commented Feb 23, 2016

I experience this bug often when pasting copy/pasting a function. Very annoying.

wingyplus added a commit to wingyplus/language-clojure that referenced this issue Sep 7, 2016
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.

3 participants