projects
/
vimb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7a83a63
)
Fixed segfault on yank without buffer.
author
Daniel Carl
<danielcarl@gmx.de>
Tue, 3 Jun 2014 12:13:18 +0000
(14:13 +0200)
committer
Daniel Carl
<danielcarl@gmx.de>
Tue, 3 Jun 2014 12:13:18 +0000
(14:13 +0200)
src/command.c
patch
|
blob
|
history
src/main.c
patch
|
blob
|
history
diff --git
a/src/command.c
b/src/command.c
index
cdf0404
..
88a9c70
100644
(file)
--- a/
src/command.c
+++ b/
src/command.c
@@
-102,9
+102,7
@@
gboolean command_yank(const Arg *arg, char buf)
}
if (text) {
/* put the text into the yank buffer */
- if (strchr(VB_USER_REG, buf)) {
- vb_register_add(buf, text);
- }
+ vb_register_add(buf, text);
vb_echo(VB_MSG_NORMAL, false, tmpl, text);
g_free(text);
@@
-125,9
+123,7
@@
gboolean command_yank(const Arg *arg, char buf)
if (a.s) {
/* put the text into the yank buffer */
vb_set_clipboard(&a);
- if (strchr(VB_USER_REG, buf)) {
- vb_register_add(buf, a.s);
- }
+ vb_register_add(buf, a.s);
vb_echo(VB_MSG_NORMAL, false, tmpl, a.s);
return true;
diff --git
a/src/main.c
b/src/main.c
index
076a6ad
..
ac44a25
100644
(file)
--- a/
src/main.c
+++ b/
src/main.c
@@
-984,7
+984,7
@@
void vb_register_add(char buf, const char *value)
char *mark;
int idx;
- if (!vb.state.enable_register) {
+ if (!vb.state.enable_register
|| !buf
) {
return;
}