Mercurial > vim
comparison src/insexpand.c @ 17543:77c3f6428b6c v8.1.1769
patch 8.1.1769: 'shellslash' is also used for completion
commit https://github.com/vim/vim/commit/ac3150d385e6e3f3fe76642aac3cda954d30583f
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jul 28 16:36:39 2019 +0200
patch 8.1.1769: 'shellslash' is also used for completion
Problem: 'shellslash' is also used for completion.
Solution: Add the 'completeslash' option. (Yasuhiro Matsumoto, closes https://github.com/vim/vim/issues/3612)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 28 Jul 2019 16:45:05 +0200 |
parents | ce04ebdf26b8 |
children | 73a93aae5f68 |
comparison
equal
deleted
inserted
replaced
17542:8ff04f492f46 | 17543:77c3f6428b6c |
---|---|
2667 EW_FILE|EW_DIR|EW_ADDSLASH|EW_SILENT) == OK) | 2667 EW_FILE|EW_DIR|EW_ADDSLASH|EW_SILENT) == OK) |
2668 { | 2668 { |
2669 | 2669 |
2670 // May change home directory back to "~". | 2670 // May change home directory back to "~". |
2671 tilde_replace(compl_pattern, num_matches, matches); | 2671 tilde_replace(compl_pattern, num_matches, matches); |
2672 #ifdef BACKSLASH_IN_FILENAME | |
2673 if (curbuf->b_p_csl[0] != NUL) | |
2674 { | |
2675 int i; | |
2676 | |
2677 for (i = 0; i < num_matches; ++i) | |
2678 { | |
2679 char_u *ptr = matches[i]; | |
2680 | |
2681 while (*ptr != NUL) | |
2682 { | |
2683 if (curbuf->b_p_csl[0] == 's' && *ptr == '\\') | |
2684 *ptr = '/'; | |
2685 else if (curbuf->b_p_csl[0] == 'b' && *ptr == '/') | |
2686 *ptr = '\\'; | |
2687 ptr += (*mb_ptr2len)(ptr); | |
2688 } | |
2689 } | |
2690 } | |
2691 #endif | |
2672 ins_compl_add_matches(num_matches, matches, p_fic || p_wic); | 2692 ins_compl_add_matches(num_matches, matches, p_fic || p_wic); |
2673 } | 2693 } |
2674 break; | 2694 break; |
2675 | 2695 |
2676 case CTRL_X_CMDLINE: | 2696 case CTRL_X_CMDLINE: |