branch: externals/idlwave
commit 8b462f73d9ed45dd3427e863d485a86f668fc9cc
Author: JD Smith <[email protected]>
Commit: JD Smith <[email protected]>
Let arrows work correctly if no process in *idl*
---
idlw-shell.el | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/idlw-shell.el b/idlw-shell.el
index 332616fc98..7ee3f3b74c 100644
--- a/idlw-shell.el
+++ b/idlw-shell.el
@@ -1472,12 +1472,14 @@ when the IDL prompt gets displayed again after the
current IDL command."
"When in last line of process buffer, do `comint-previous-input'.
Otherwise just move the line. Move down unless UP is non-nil.
Move normally inside of blocks, unless NOBLOCK-MOVE is non-nil."
- (let* ((proc-pos (marker-position
- (process-mark (get-buffer-process (current-buffer)))))
+ (let* ((proc (get-buffer-process (current-buffer)))
+ (proc-pos (if proc (marker-position (process-mark proc))))
(arg (or arg 1))
(arg (if up arg (- arg))))
+
(if (eq t idlwave-shell-arrows-do-history) (goto-char proc-pos))
- (if (and idlwave-shell-arrows-do-history
+ (if (and proc
+ idlwave-shell-arrows-do-history
(or noblock-move
(if up
(= (line-number-at-pos) (line-number-at-pos proc-pos))