branch: master
commit d437c3d959490fed11a6ca17ebd69e59efe3f091
Merge: 6a5c71d 949ed38
Author: R. Bernstein <[email protected]>
Commit: R. Bernstein <[email protected]>
Merge pull request #81 from rocky/ipdb-complete
Ipdb complete
---
realgud/debugger/ipdb/core.el | 2 +-
realgud/debugger/ipdb/ipdb.el | 4 ++++
test/test-ipdb.el | 1 +
3 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/realgud/debugger/ipdb/core.el b/realgud/debugger/ipdb/core.el
index 43a42c5..e8a1a8c 100644
--- a/realgud/debugger/ipdb/core.el
+++ b/realgud/debugger/ipdb/core.el
@@ -247,7 +247,7 @@ why we need the `bounds-of-thing-at-point')."
;; we need to change the start position to that of the current word
;; since python returns just the word (and not the whole line)
- (setq start-position (car bounds))
+ (if (car bounds) (setq start-position (car bounds)))
(list start-position
end-position
diff --git a/realgud/debugger/ipdb/ipdb.el b/realgud/debugger/ipdb/ipdb.el
index 0cc8eb7..447aeef 100644
--- a/realgud/debugger/ipdb/ipdb.el
+++ b/realgud/debugger/ipdb/ipdb.el
@@ -77,6 +77,10 @@ fringe and marginal icons.
)
(add-hook 'completion-at-point-functions
'realgud:ipdb-completion-at-point nil t)
+ (with-current-buffer cmd-buf
+ (add-hook 'completion-at-point-functions
+ 'realgud:ipdb-completion-at-point nil t)
+ )
cmd-buf)
)
diff --git a/test/test-ipdb.el b/test/test-ipdb.el
index e82e56f..77b32aa 100644
--- a/test/test-ipdb.el
+++ b/test/test-ipdb.el
@@ -23,6 +23,7 @@
(assert-equal "ipdb" debugger-name "debugger name gets passed")
(assert-equal (expand-file-name "./gcd.py") script-filename "file name
check")
(assert-equal '("3" "5") (cddr cmd-args) "command args listified")
+ (generate-new-buffer "*cmdbuf-test*")
)
(note "ipdb-parse-cmd-args")