Skip to content

Commit 8366430

Browse files
andreaslynvim-scripts
authored andcommitted
Version 0.3
* Fixed exception when trying to set break point while gdb was not running * Changed ConqueGdb* commands to use file completion now
1 parent 4c8983b commit 8366430

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

autoload/conque_gdb.vim

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -464,8 +464,10 @@ endfunction
464464
" Note that this is only supported on Unix where gdb has support for the
465465
" python API.
466466
function! conque_gdb#toggle_breakpoint(fullfile, line)
467-
let l:command = "clear "
468-
sil exe s:py . ' ' . s:gdb.var . '.vim_toggle_breakpoint("' . s:escape_to_py_file(a:fullfile) .'","'. a:line .'")'
467+
let l:command = "clear "
468+
if bufloaded(s:gdb.buffer_number) || s:gdb.active
469+
sil exe s:py . ' ' . s:gdb.var . '.vim_toggle_breakpoint("' . s:escape_to_py_file(a:fullfile) .'","'. a:line .'")'
470+
endif
469471
call conque_gdb#command(l:command . a:fullfile . ':' . a:line)
470472
endfunction
471473

plugin/conque_gdb.vim

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,15 +68,15 @@ if !exists('g:ConqueGdb_Print')
6868
endif
6969

7070
" Commands to open conque gdb
71-
command! -nargs=* -complete=shellcmd ConqueGdb call conque_gdb#open(<q-args>, [
71+
command! -nargs=* -complete=file ConqueGdb call conque_gdb#open(<q-args>, [
7272
\ get(g:conque_gdb_src_splits, g:ConqueGdb_SrcSplit, g:conque_gdb_default_split),
7373
\ 'buffer ' . bufnr("%"),
7474
\ 'wincmd w'])
75-
command! -nargs=* -complete=shellcmd ConqueGdbSplit call conque_gdb#open(<q-args>, [
75+
command! -nargs=* -complete=file ConqueGdbSplit call conque_gdb#open(<q-args>, [
7676
\ 'rightbelow split'])
77-
command! -nargs=* -complete=shellcmd ConqueGdbVSplit call conque_gdb#open(<q-args>, [
77+
command! -nargs=* -complete=file ConqueGdbVSplit call conque_gdb#open(<q-args>, [
7878
\ 'rightbelow vsplit'])
79-
command! -nargs=* -complete=shellcmd ConqueGdbTab call conque_gdb#open(<q-args>, [
79+
command! -nargs=* -complete=file ConqueGdbTab call conque_gdb#open(<q-args>, [
8080
\ 'tabnew',
8181
\ get(g:conque_gdb_src_splits, g:ConqueGdb_SrcSplit, g:conque_gdb_default_split),
8282
\ 'buffer ' . bufnr("%"),

0 commit comments

Comments
 (0)