comparison src/cmdexpand.c @ 18987:e378907d79bf v8.2.0054

patch 8.2.0054: :diffget and :diffput don't have good completion Commit: https://github.com/vim/vim/commit/ae7dba896975051a3f0b7123faa08dac5635972d Author: Bram Moolenaar <Bram@vim.org> Date: Sun Dec 29 13:56:33 2019 +0100 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 https://github.com/vim/vim/issues/5409)
author Bram Moolenaar <Bram@vim.org>
date Sun, 29 Dec 2019 14:00:04 +0100
parents baf890fa1621
children cec4da73951a
comparison
equal deleted inserted replaced
18986:0c14e5992fcf 18987:e378907d79bf
1580 case CMD_sbuffer: 1580 case CMD_sbuffer:
1581 case CMD_checktime: 1581 case CMD_checktime:
1582 xp->xp_context = EXPAND_BUFFERS; 1582 xp->xp_context = EXPAND_BUFFERS;
1583 xp->xp_pattern = arg; 1583 xp->xp_pattern = arg;
1584 break; 1584 break;
1585 1585 #ifdef FEAT_DIFF
1586 case CMD_diffget:
1587 case CMD_diffput:
1588 // If current buffer is in diff mode, complete buffer names
1589 // which are in diff mode, and different than current buffer.
1590 xp->xp_context = EXPAND_DIFF_BUFFERS;
1591 xp->xp_pattern = arg;
1592 break;
1593 #endif
1586 case CMD_USER: 1594 case CMD_USER:
1587 case CMD_USER_BUF: 1595 case CMD_USER_BUF:
1588 if (compl != EXPAND_NOTHING) 1596 if (compl != EXPAND_NOTHING)
1589 { 1597 {
1590 // EX_XFILE: file names are handled above 1598 // EX_XFILE: file names are handled above
2067 return expand_shellcmd(pat, num_file, file, flags); 2075 return expand_shellcmd(pat, num_file, file, flags);
2068 if (xp->xp_context == EXPAND_OLD_SETTING) 2076 if (xp->xp_context == EXPAND_OLD_SETTING)
2069 return ExpandOldSetting(num_file, file); 2077 return ExpandOldSetting(num_file, file);
2070 if (xp->xp_context == EXPAND_BUFFERS) 2078 if (xp->xp_context == EXPAND_BUFFERS)
2071 return ExpandBufnames(pat, num_file, file, options); 2079 return ExpandBufnames(pat, num_file, file, options);
2080 #ifdef FEAT_DIFF
2081 if (xp->xp_context == EXPAND_DIFF_BUFFERS)
2082 return ExpandBufnames(pat, num_file, file, options | BUF_DIFF_FILTER);
2083 #endif
2072 if (xp->xp_context == EXPAND_TAGS 2084 if (xp->xp_context == EXPAND_TAGS
2073 || xp->xp_context == EXPAND_TAGS_LISTFILES) 2085 || xp->xp_context == EXPAND_TAGS_LISTFILES)
2074 return expand_tags(xp->xp_context == EXPAND_TAGS, pat, num_file, file); 2086 return expand_tags(xp->xp_context == EXPAND_TAGS, pat, num_file, file);
2075 if (xp->xp_context == EXPAND_COLORS) 2087 if (xp->xp_context == EXPAND_COLORS)
2076 { 2088 {