File tree 2 files changed +15
-7
lines changed
2 files changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -990,6 +990,10 @@ Insert KEY if there's no command."
990
990
(should (string= (lispy-with " ~;; foo|\n (bar)" (lispy-mark-list 1 ))
991
991
" |;; foo\n (bar)" )))
992
992
993
+ (ert-deftest lispy-mark-car ()
994
+ (should (string= (lispy-with " |\" foo\" ~" (lispy-mark-car))
995
+ " \" ~foo|\" " )))
996
+
993
997
(provide 'lispy-test )
994
998
995
999
; ;; Local Variables:
Original file line number Diff line number Diff line change @@ -2406,13 +2406,17 @@ Second region and buffer are the current ones."
2406
2406
(interactive )
2407
2407
(let ((bnd-1 (lispy--bounds-dwim))
2408
2408
bnd-2)
2409
- (goto-char (car bnd-1))
2410
- (while (and (equal bnd-1 (setq bnd-2 (bounds-of-thing-at-point 'sexp )))
2411
- (< (point ) (cdr bnd-1)))
2412
- (forward-char ))
2413
- (if bnd-2
2414
- (lispy--mark bnd-2)
2415
- (lispy-complain " can't descend further" ))))
2409
+ (if (and (eq (char-after (car bnd-1)) ?\" )
2410
+ (eq (char-before (cdr bnd-1)) ?\" ))
2411
+ (lispy--mark (cons (1+ (car bnd-1))
2412
+ (1- (cdr bnd-1))))
2413
+ (goto-char (car bnd-1))
2414
+ (while (and (equal bnd-1 (setq bnd-2 (bounds-of-thing-at-point 'sexp )))
2415
+ (< (point ) (cdr bnd-1)))
2416
+ (forward-char ))
2417
+ (if bnd-2
2418
+ (lispy--mark bnd-2)
2419
+ (lispy-complain " can't descend further" )))))
2416
2420
2417
2421
; ; ——— Locals: miscellanea ————————————————————————————————————————————————————
2418
2422
(defvar lispy-mode-x-map (make-sparse-keymap ))
You can’t perform that action at this time.
0 commit comments