diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2019-06-22 04:30:48 -0400 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2019-06-23 18:17:09 -0400 |
commit | 98801ec7aea199b80373d1dc072021a98db63a8b (patch) | |
tree | 7336ebcc53f632ac4d96a59dc45b27e16533d4a0 /src/nvim/quickfix.c | |
parent | ff244a1309482e818c6731038f0232fae613431c (diff) | |
download | rneovim-98801ec7aea199b80373d1dc072021a98db63a8b.tar.gz rneovim-98801ec7aea199b80373d1dc072021a98db63a8b.tar.bz2 rneovim-98801ec7aea199b80373d1dc072021a98db63a8b.zip |
vim-patch:8.1.0166: using dict_add_nr_str() is clumsy
Problem: Using dict_add_nr_str() is clumsy.
Solution: Split into two functions. (Ozaki Kiichi, closes vim/vim#3154)
https://github.com/vim/vim/commit/e0be167a805fd547c25ec1ec97fd4c7f13046236
Diffstat (limited to 'src/nvim/quickfix.c')
-rw-r--r-- | src/nvim/quickfix.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/nvim/quickfix.c b/src/nvim/quickfix.c index fb753609bd..81da410826 100644 --- a/src/nvim/quickfix.c +++ b/src/nvim/quickfix.c @@ -4739,11 +4739,8 @@ static int qf_getprop_defaults(qf_info_T *qi, int flags, dict_T *retdict) /// Return the quickfix list title as 'title' in retdict static int qf_getprop_title(qf_info_T *qi, int qf_idx, dict_T *retdict) { - char_u *t = qi->qf_lists[qf_idx].qf_title; - if (t == NULL) { - t = (char_u *)""; - } - return tv_dict_add_str(retdict, S_LEN("title"), (const char *)t); + return tv_dict_add_str(retdict, S_LEN("title"), + (const char *)qi->qf_lists[qf_idx].qf_title); } /// Return the quickfix list items/entries as 'items' in retdict |