atom-parinfer icon indicating copy to clipboard operation
atom-parinfer copied to clipboard

Parinfer sporadically causes window maximization when opening file requiring changes

Open ghost opened this issue 7 years ago • 6 comments

Sometimes when opening a clojure file in Atom that does not conform to the parinfer standards, while the dialog "parinfer needs to change this file", Atom will maximize the window. This is supremely annoying. It doesn't happen at other times.

I'm still figuring out how to reproduce this exactly, and I've only noticed this when dealing with co-workers' source who don't use Parinfer, so I can't provide a "known triggering file". I'm wondering if you've seen/heard of this bug before.

ghost avatar Feb 02 '18 21:02 ghost

Thanks for reporting. I have not experienced this bug, nor heard any other reports of it. But sounds like something worth investigating.

Have you isolated this down to atom-parinfer specifically? Could it be another plugin causing this behavior?

oakmac avatar Feb 02 '18 22:02 oakmac

I wasn't 100% sure it was parinfer, but it was only triggering alongside the parinfer dialog prompting to fix a poorly-formatted file. I also could not reliably reproduce the problem even with the same exact file contents across different Atom sessions.

Anyway, I haven't been able to reproduce the problem since upgrading to 1.22, so I'm going to mark it as closed for now. If I see the problem again I'll try to get more info.

ghost avatar Feb 05 '18 23:02 ghost

I guess I spoke too soon. It's back. And I can somewhat reliably reproduce, and have verified that it happens only when parinfer is enabled, and will happen when only parinfer is enabled.

The source file in question is a vase-api-descriptor.edn from one of our projects that I can't share, but I'll see if I can't narrow it down to something in particular with the file that causes the problem sometime soon.

ghost avatar Feb 06 '18 01:02 ghost

OK, I have an example that, at least right now, with a bare Atom except for Parinfer, is causing Atom to maximize its window every time I open the file.

This is at /env/dev/clj/user.clj in the repository, with the contents:

(ns user
  (:require [mount.core :as mount]

(defn start []
  (mount/start)
)

(defn stop []
  (mount/stop)
)

(defn restart [])

Yes the file is missing an unbalanced paren, and yes the parens that are in there are hanging.

ghost avatar Mar 06 '18 21:03 ghost

What platform and version of Atom are you using?

When you open that file, do you see a message like the following:

parinfer-warning

I am trying to recreate this bug, but not having any luck ;)

oakmac avatar Mar 27 '18 00:03 oakmac

I experienced this bug today! Or at least a similar bug.

Steps:

  1. On Mac OSX. Atom v1.24.1
  2. Window was maximized
  3. Opened a file that Parinfer needed to adjust the parens (shown the dialog)
  4. Window went from maximized to a smaller, fixed size.

My hunch is this is something involving the Atom API. Not this extension. But still worth investigating.

oakmac avatar Aug 03 '18 15:08 oakmac