Skip to content

Commit 522f5f6

Browse files
committed
Amend docs; fix empty string for AddDebugStringExpr
1 parent 76f74b9 commit 522f5f6

2 files changed

Lines changed: 11 additions & 13 deletions

File tree

README.md

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
## Purpose
2121

22-
debugstring aims to automate standard debugging operations (e.g., segfaults).
22+
`debugstring` aims to automate standard debugging operations (e.g., segfaults).
2323
It does that by facilitating the ubiquitous
2424
[printf()-debugging](https://everything2.com/title/printf%28%29%20debugging)
2525
i.e., scatter logging statements around the various code snippets that you want
@@ -118,14 +118,6 @@ std::cout << "[a.c:4] a_variable: " << a_variable << std::endl;
118118

119119
## Installation
120120

121-
### Dependencies
122-
123-
debugstring depends on the following vim plugins:
124-
125-
- vim-repeat [OPTIONAL]
126-
127-
### Using a runtimepath/package manager
128-
129121
| Plugin manager | How to install |
130122
| :------------- | :------------- |
131123
| [Dein][1] | `call dein#add('bergercookie/vim-debugstring')` |
@@ -141,8 +133,12 @@ debugstring depends on the following vim plugins:
141133
[4]: https://github.com/junegunn/vim-plug
142134
[5]: https://github.com/VundleVim/Vundle.vim
143135

144-
Plugin also utilizes [vim-repeat](https://github.com/tpope/vim-repeat) if the
145-
latter is installed.
136+
137+
### Dependencies
138+
139+
`debugstring` depends on the following vim plugins:
140+
141+
- vim-repeat [OPTIONAL]
146142

147143
## Contributing
148144

plugin/debugstring.vim

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
" Version: 0.1
44

55

6-
7-
" TODO: Rewrite these instructions
86
""
97
" @section Introduction, intro
108
"
@@ -185,6 +183,10 @@ function! s:debugFunctionWrapper(mode, ...)
185183
let l:expr = a:1
186184
endif
187185

186+
if empty(l:expr)
187+
return
188+
endif
189+
188190
AddDebugStringExpr(l:expr)
189191

190192
" Make way for repeat.vim

0 commit comments

Comments
 (0)