diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/eval/funcs.c | 9 | ||||
-rw-r--r-- | src/nvim/spellsuggest.c | 4 | ||||
-rw-r--r-- | src/nvim/tag.c | 2 |
3 files changed, 10 insertions, 5 deletions
diff --git a/src/nvim/eval/funcs.c b/src/nvim/eval/funcs.c index c8ad61f885..587b3a9c88 100644 --- a/src/nvim/eval/funcs.c +++ b/src/nvim/eval/funcs.c @@ -3563,16 +3563,19 @@ static void f_inputlist(typval_T *argvars, typval_T *rettv, EvalFuncData fptr) msg_scroll = true; msg_clr_eos(); - TV_LIST_ITER_CONST(argvars[0].vval.v_list, li, { + list_T *l = argvars[0].vval.v_list; + TV_LIST_ITER_CONST(l, li, { msg_puts(tv_get_string(TV_LIST_ITEM_TV(li))); - msg_putchar('\n'); + if (!ui_has(kUIMessages) || TV_LIST_ITEM_NEXT(l, li) != NULL) { + msg_putchar('\n'); + } }); // Ask for choice. bool mouse_used = false; int selected = prompt_for_input(NULL, 0, false, &mouse_used); if (mouse_used) { - selected = tv_list_len(argvars[0].vval.v_list) - (cmdline_row - mouse_row); + selected = tv_list_len(l) - (cmdline_row - mouse_row); } rettv->vval.v_number = selected; diff --git a/src/nvim/spellsuggest.c b/src/nvim/spellsuggest.c index ca47d9ea3c..178ef6cdfb 100644 --- a/src/nvim/spellsuggest.c +++ b/src/nvim/spellsuggest.c @@ -588,7 +588,9 @@ void spell_suggest(int count) msg_advance(30); msg_puts(IObuff); } - msg_putchar('\n'); + if (!ui_has(kUIMessages) || i < sug.su_ga.ga_len - 1) { + msg_putchar('\n'); + } } cmdmsg_rl = false; diff --git a/src/nvim/tag.c b/src/nvim/tag.c index baa862f57a..ee6b0863f3 100644 --- a/src/nvim/tag.c +++ b/src/nvim/tag.c @@ -961,7 +961,7 @@ static void print_tag_list(bool new_tag, bool use_tagstack, int num_matches, cha break; } } - if (msg_col) { + if (msg_col && (!ui_has(kUIMessages) || i < num_matches - 1)) { msg_putchar('\n'); } os_breakcheck(); |