File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -618,18 +618,22 @@ If so, return an equivalent of ITEM = ARRAY_LIKE[IDX]; ITEM."
618618 (setq lispy-eval-output nil )
619619 (let* ((echo (if (eq current-prefix-arg 2 ) nil t ))
620620 (fstr
621- (if (or (string-match-p " .\n +." str) (string-match-p " \"\"\" " str))
622- (let ((temp-file-name (python-shell--save-temp-file str)))
623- (format " lp.eval_to_json('', %s ) "
624- (lispy--dict
625- :code temp-file-name
626- :fname (buffer-file-name )
627- :echo echo)))
621+ (cond
622+ ((eq current-prefix-arg 3 )
623+ (format " lp.eval_to_json(\"\"\" lp.select_item(\" %s \" , 0)\"\"\" ) " str))
624+ ((or (string-match-p " .\n +." str) (string-match-p " \"\"\" " str))
625+ (let ((temp-file-name (python-shell--save-temp-file str)))
626+ (format " lp.eval_to_json('', %s ) "
627+ (lispy--dict
628+ :code temp-file-name
629+ :fname (buffer-file-name )
630+ :echo echo))))
631+ (t
628632 (format " lp.eval_to_json(\"\"\" %s \"\"\" , %s ) "
629633 (replace-regexp-in-string " \\\\ n" " \\\\ n" str nil t )
630634 (lispy--dict :fname (buffer-file-name )
631635 :echo echo
632- :use-in-expr use-in-expr))))
636+ :use-in-expr use-in-expr)))))
633637 (rs (python-shell-send-string-no-output
634638 fstr
635639 (lispy--python-proc)))
You can’t perform that action at this time.
0 commit comments