Skip to content

Commit 371eba4

Browse files
committed
merged issue python-mode#840: fixed pymode_breakpoint deleting line if no debugger was found
1 parent dadf48a commit 371eba4

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-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 g:pymode_breakpoint_cmd == ''
29+
echoerr("g:pymode_breakpoint_cmd is empty")
30+
return -1
31+
endif
2832
let line = getline(a:lnum)
2933
if strridx(line, g:pymode_breakpoint_cmd) != -1
3034
normal dd

tests/test_bash/test_folding.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#! /bin/bash
22

3+
# Note: a solution with unix 'timeout' program was tried but it was unsuccessful. The problem with folding 4 is that in the case of a crash one expects the folding to just stay in an infinite loop, thus never existing with error. An improvement is suggested to this case.
4+
35
# Source file.
46
set +e
57
source ./test_helpers_bash/test_prepare_between_tests.sh

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy