File tree Expand file tree Collapse file tree 3 files changed +19
-2
lines changed Expand file tree Collapse file tree 3 files changed +19
-2
lines changed Original file line number Diff line number Diff line change 11
11
* [ #2941 ] ( https://github.com/clojure-emacs/cider/issues/2941 ) : Use main args in alias for clojure cli
12
12
* [ #2953 ] ( https://github.com/clojure-emacs/cider/issues/2953 ) : Don't font-lock function/macro vars as vars.
13
13
* [ #2964 ] ( https://github.com/clojure-emacs/cider/issues/2964 ) : Fixes issue with ` cider-company-enable-fuzzy-completion ` and Helm
14
+ * [ #2937 ] ( https://github.com/clojure-emacs/cider/issues/2937 ) : Green fringe produced for extra line in rich comment block
14
15
15
16
### Changes
16
17
17
18
* Removed ` cider-clojure-cli-parameters ` due to clojure-cli jack-in changes
18
19
* Bump the injected ` cider-nrepl ` to 0.25.6. This should fix a compatibility issue with Java 15 and fetching fresh ClojureDocs data.
20
+ * Changed the behaviour of ` cider-last-sexp ` so it returns only the sexp, excluding all whitespace and/or the first newline after.
19
21
20
22
## 1.0.0 (2020-28-12)
21
23
Original file line number Diff line number Diff line change @@ -193,8 +193,6 @@ instead."
193
193
(clojure-backward-logical-sexp 1 )
194
194
(list (point )
195
195
(progn (clojure-forward-logical-sexp 1 )
196
- (skip-chars-forward " [:blank:]" )
197
- (when (looking-at-p " \n " ) (forward-char 1 ))
198
196
(point ))))))
199
197
200
198
(defun cider-start-of-next-sexp (&optional skip )
Original file line number Diff line number Diff line change @@ -213,6 +213,23 @@ buffer."
213
213
(insert " '" )
214
214
(expect (cider-sexp-at-point 'bounds ) :to-equal '(5 15 ))))))
215
215
216
+ (describe " cider-last-sexp"
217
+ (describe " when the param 'bounds is not given"
218
+ (it " returns the last sexp"
219
+ (with-clojure-buffer " a\n\n (defn ...)|\n\n b"
220
+ (expect (cider-last-sexp) :to-equal " (defn ...)" )))
221
+ (it " returns the last sexp event when there are whitespaces"
222
+ (with-clojure-buffer " a\n\n (defn ...) ,\n |\n b"
223
+ (expect (cider-last-sexp) :to-equal " (defn ...)" ))))
224
+
225
+ (describe " when the param 'bounds is given"
226
+ (it " returns the bounds of last sexp"
227
+ (with-clojure-buffer " a\n\n (defn ...)|\n\n b"
228
+ (expect (cider-last-sexp 'bounds ) :to-equal '(4 14 ))))
229
+ (it " returns the bounds of last sexp event when there are whitespaces"
230
+ (with-clojure-buffer " a\n\n (defn ...) ,\n |\n b"
231
+ (expect (cider-last-sexp 'bounds ) :to-equal '(4 14 ))))))
232
+
216
233
(describe " cider-defun-at-point"
217
234
(describe " when the param 'bounds is not given"
218
235
(it " returns the defun at point"
You can’t perform that action at this time.
0 commit comments