diff options
author | LemonBoy <thatlemon@gmail.com> | 2022-05-26 15:23:26 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-05-26 15:23:26 +0100 |
commit | 9bcb9ca9c7dd1632385dc3351b5e019739368658 (patch) | |
tree | dd0820db2970ea6a5264e17493937a75ca062a8e /src/insexpand.c | |
parent | 30b9a41ad9963b8c57afea1f33a4e180fc23a892 (diff) | |
download | vim-git-9bcb9ca9c7dd1632385dc3351b5e019739368658.tar.gz |
patch 8.2.5022: 'completefunc'/'omnifunc' error does not end completionv8.2.5022
Problem: 'completefunc'/'omnifunc' error does not end completion.
Solution: Check if there was an error or exception. (closes #10486,
closes #4218)
Diffstat (limited to 'src/insexpand.c')
-rw-r--r-- | src/insexpand.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/insexpand.c b/src/insexpand.c index fd1218fd7..89e0ebd81 100644 --- a/src/insexpand.c +++ b/src/insexpand.c @@ -4522,11 +4522,12 @@ get_userdefined_compl_info(colnr_T curs_col UNUSED) return FAIL; } - // Return value -2 means the user complete function wants to - // cancel the complete without an error. - // Return value -3 does the same as -2 and leaves CTRL-X mode. - if (col == -2) + // Return value -2 means the user complete function wants to cancel the + // complete without an error, do the same if the function did not execute + // successfully. + if (col == -2 || aborting()) return FAIL; + // Return value -3 does the same as -2 and leaves CTRL-X mode. if (col == -3) { ctrl_x_mode = CTRL_X_NORMAL; |