aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ops.c
diff options
context:
space:
mode:
authorFelipe Oliveira Carvalho <felipekde@gmail.com>2014-05-30 22:46:26 -0300
committerFelipe Oliveira Carvalho <felipekde@gmail.com>2014-06-16 01:36:31 -0300
commit8234f2839f78009442b4ed7bc0599e6b581d5cf8 (patch)
tree58778fbe69bf5d471563a99163e3ade8aa661d32 /src/nvim/ops.c
parentf7e64c3c5f70bf642f0ec7bec835f2827939abd7 (diff)
downloadrneovim-8234f2839f78009442b4ed7bc0599e6b581d5cf8.tar.gz
rneovim-8234f2839f78009442b4ed7bc0599e6b581d5cf8.tar.bz2
rneovim-8234f2839f78009442b4ed7bc0599e6b581d5cf8.zip
No OOM in vim_strsave_escaped[_ext]()
Diffstat (limited to 'src/nvim/ops.c')
-rw-r--r--src/nvim/ops.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/nvim/ops.c b/src/nvim/ops.c
index 4f1cd5d526..d976b3d4e8 100644
--- a/src/nvim/ops.c
+++ b/src/nvim/ops.c
@@ -943,14 +943,12 @@ do_execreg (
(char_u *)
"\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037",
Ctrl_V, FALSE);
- if (p != NULL) {
- /* When in Visual mode "'<,'>" will be prepended to the command.
- * Remove it when it's already there. */
- if (VIsual_active && STRNCMP(p, "'<,'>", 5) == 0)
- retval = put_in_typebuf(p + 5, TRUE, TRUE, silent);
- else
- retval = put_in_typebuf(p, TRUE, TRUE, silent);
- }
+ /* When in Visual mode "'<,'>" will be prepended to the command.
+ * Remove it when it's already there. */
+ if (VIsual_active && STRNCMP(p, "'<,'>", 5) == 0)
+ retval = put_in_typebuf(p + 5, TRUE, TRUE, silent);
+ else
+ retval = put_in_typebuf(p, TRUE, TRUE, silent);
free(p);
} else if (regname == '=') {
p = get_expr_line();