Skip to content

Commit c604658

Browse files
committed
if g:pymode_breakpoint_cmd is empty, skip pymode#breakpoint#operate
1 parent dadf48a commit c604658

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

autoload/pymode/breakpoint.vim

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ fun! pymode#breakpoint#init() "{{{
1111

1212
from imp import find_module
1313

14-
for module in ('wdb', 'pudb', 'ipdb'):
14+
for module in ('wdb', 'pudb', 'ipdb', 'pdb'):
1515
try:
1616
find_module(module)
1717
vim.command('let g:pymode_breakpoint_cmd = "import %s; %s.set_trace() # XXX BREAKPOINT"' % (module, module))
@@ -25,6 +25,10 @@ EOF
2525
endfunction "}}}
2626

2727
fun! pymode#breakpoint#operate(lnum) "{{{
28+
if strlen(g:pymode_breakpoint_cmd) == 0
29+
echoerr("g:pymode_breakpoint_cmd is empty")
30+
return
31+
endif
2832
let line = getline(a:lnum)
2933
if strridx(line, g:pymode_breakpoint_cmd) != -1
3034
normal dd

0 commit comments

Comments
 (0)