guns / vim-clojure-static

Meikel Brandmeyer's excellent Clojure runtime files

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Suddenly, strange issues with indentation

mybuddymichael opened this issue · comments

If I take a line line this:

(re-seq #"[A-Z]" (clojure.string/upper-case c)))

and break up the two arguments, I get this:

(re-seq #"[A-Z]"
                  (clojure.string/upper-case c)))

I've noticed it with several other forms and it appears that arguments after newlines always want to start at the 20th column. I'm up-to-date with master, and I get the same result with both Clojure 1.4.0 and 1.5.1.

Hey Michael,

I can't seem to reproduce with that form; could you please tell me the output of vim --version, and perhaps another example?

While we're on the topic, I've noticed other strange problems recently with indentation so I am going to undertake a careful rewrite of the indenting system this weekend along with a test suite.

I worried that this might be local to my setup...

I'm currently on Vim 7.3.872, and I've discovered that the behavior is caused by something introduced in patch 871. Patch 865 does not have this problem. I'll revert back to 865 for now and monitor future patches to see if it fixes itself.

Thanks and sorry!

It doesn't appear that 7.3.871 has been acknowledged as problematic by the vim_dev mailing list. However, that patch does change a corner case of search(), which is used extensively by the indent script. If this patch really causes this issue, it's definitely a legitimate issue.

I pull from the version kept by b4winckler, but he's been lagging behind the official hg repository (which I guess I will start tracking directly now), so I applied 7.3.871 on top of 7.3.863, and I do see the problem now (although not with your example strangely).

I am going to reopen this until either I fix the problem or report the issue upstream.

Thanks!

This was definitely a bug in 7.3.871. I found the issue and sent it upstream:

https://groups.google.com/d/msg/vim_dev/UNuAJ_lKqng/XRPH6LN9vmQJ

If it gets accepted, I'll close this issue.

No kidding... Nice work!

I have been facing the same issue in last several days and noticed Bram committed the fix by Sung Pae as patch 877 yesterday. Just grabbed the latest source code and it's working perfectly. Thanks for the great work!

Ah, that's right, I was supposed to close this. Thanks for reporting Michael; I got to be first in line with a fix in hand.

No problem. Thanks for the patch.