This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-08-30
Channels
- # aws (2)
- # beginners (139)
- # boot (9)
- # cider (1)
- # clara (2)
- # cljs-dev (35)
- # cljsrn (3)
- # clojure (112)
- # clojure-dusseldorf (9)
- # clojure-greece (6)
- # clojure-italy (13)
- # clojure-russia (160)
- # clojure-seattle-old (1)
- # clojure-uk (79)
- # clojurescript (85)
- # clojutre (1)
- # community-development (11)
- # core-async (32)
- # cryogen (2)
- # cursive (5)
- # data-science (16)
- # datomic (2)
- # events (1)
- # fulcro (29)
- # funcool (1)
- # graphql (4)
- # immutant (5)
- # instaparse (20)
- # jobs (2)
- # juxt (6)
- # leiningen (11)
- # luminus (21)
- # lumo (1)
- # off-topic (7)
- # onyx (20)
- # parinfer (33)
- # pedestal (4)
- # re-frame (41)
- # reagent (34)
- # ring-swagger (14)
- # rum (5)
- # spacemacs (9)
- # specter (11)
- # sql (14)
- # test-check (3)
- # yada (20)
Here’s another interesting problem:
(defn empty-panel [text]
(let [status-text (extend-class StatusText []
(isStatusVisible [this] true))
panel (extend-class JPanel []
(paintComponent [this g]
(.paintComponent ^JPanel this ^Graphics g)
(.paint status-text this g)))]
(doto status-text
(.attachTo panel)
(.setText text))
panel))
I then rename panel
, and start typing a totally new name, so I press delete and then start typing.
When I do that, the panel
in (.attachTo panel)
disappears, and parinfer deletes the space in there.
I think that will be ok, since I have already modified my version to accept multiple carets. I haven’t tested the edge cases with that yet though.
I suspect it will be weird if you have the same file open in multiple editors and are editing a line that the caret is on in another editor.
i’m not understanding how the rename operation happens
might be easier to diagnose this problem with a list of changes
that the rename operation produces
@shaunlebron Let me record a video
The issue is that the symbol to be renamed is deleted temporarily if I delete the whole name, and the paren isn’t held because the caret isn’t there.
I think I can create some extra hold locations from the template positions during the rename.
I’m not sure if they should participate in the hold release mechanism or not - probably, I guess.
i.e. they’ll be basically just like caret positions that don’t have a previous position.
Actually, perhaps they could have a previous position, and I’ll pretend there is a caret inside each template location at the same offset as the actual caret is within its template location.
yeah, if you already have multiple cursor support, it should work by placing a cursor at the end of each template
nice gif! should be easier to communicate these subtleties now
@shaunlebron That works a treat
very cool, i noticed the )
being held at last line
i take it you’re not using forceBalance
?
I can’t think of a situation when that might affect the indentation, but I’m sure there are plenty of weird edge cases I haven’t thought of.
well i’m only recommending forceBalance: false
if it’s enabled, it doesn’t support )
being on its own line