mirror of
https://github.com/neovim/neovim.git
synced 2025-09-19 17:58:18 +00:00
vim-patch:8.2.0054: :diffget and :diffput don't have good completion
Problem: :diffget and :diffput don't have good completion.
Solution: Add proper completion. (Dominique Pelle, closes vim/vim#5409)
ae7dba8969
This commit is contained in:
@@ -3512,6 +3512,13 @@ const char * set_one_cmd_context(
|
||||
xp->xp_context = EXPAND_BUFFERS;
|
||||
xp->xp_pattern = (char_u *)arg;
|
||||
break;
|
||||
case CMD_diffget:
|
||||
case CMD_diffput:
|
||||
// If current buffer is in diff mode, complete buffer names
|
||||
// which are in diff mode, and different than current buffer.
|
||||
xp->xp_context = EXPAND_DIFF_BUFFERS;
|
||||
xp->xp_pattern = (char_u *)arg;
|
||||
break;
|
||||
case CMD_USER:
|
||||
case CMD_USER_BUF:
|
||||
if (context != EXPAND_NOTHING) {
|
||||
@@ -5174,6 +5181,7 @@ static const char *command_complete[] =
|
||||
[EXPAND_CSCOPE] = "cscope",
|
||||
[EXPAND_USER_DEFINED] = "custom",
|
||||
[EXPAND_USER_LIST] = "customlist",
|
||||
[EXPAND_DIFF_BUFFERS] = "diff_buffer",
|
||||
[EXPAND_DIRECTORIES] = "dir",
|
||||
[EXPAND_ENV_VARS] = "environment",
|
||||
[EXPAND_EVENTS] = "event",
|
||||
|
Reference in New Issue
Block a user