File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change 22
22
23
23
(defun haskell-interactive-handle-expr ()
24
24
" Handle an inputted expression at the REPL."
25
- (when (haskell-interactive-at-prompt)
26
- (let ((expr (haskell-interactive-mode-input)))
27
- (unless (string= " " (replace-regexp-in-string " " " " expr))
25
+ (let ((expr (haskell-interactive-mode-input))
26
+ (at-prompt-line (>= (line-end-position )
27
+ haskell-interactive-mode-prompt-start)))
28
+ (if (and at-prompt-line
29
+ (string= " " (replace-regexp-in-string " " " " expr)))
30
+ (progn
31
+ (goto-char (point-max ))
32
+ (insert " \n " )
33
+ (haskell-interactive-mode-prompt))
34
+ (when (haskell-interactive-at-prompt)
28
35
(cond
29
36
; ; If already evaluating, then the user is trying to send
30
37
; ; input to the REPL during evaluation. Most likely in
37
44
haskell-interactive-mode-result-end
38
45
(point ))))
39
46
; ; here we need to go to end of line again as evil-mode
40
- ; ; might hae managed to put us one char back
47
+ ; ; might have managed to put us one char back
41
48
(goto-char (point-max ))
42
49
(insert " \n " )
43
50
; ; Bring the marker forward
You can’t perform that action at this time.
0 commit comments