comparison src/ex_getln.c @ 27744:515ce8e07bf2 v8.2.4398

patch 8.2.4398: some command completion functions are too long Commit: https://github.com/vim/vim/commit/b31aec3b9387ed12677dca09069c3ae98c6c7447 Author: Yegappan Lakshmanan <yegappan@yahoo.com> Date: Wed Feb 16 12:44:29 2022 +0000 patch 8.2.4398: some command completion functions are too long Problem: Some command completion functions are too long. Solution: Refactor code into separate functions. Add a few more tests. (Yegappan Lakshmanan, closes #9785)
author Bram Moolenaar <Bram@vim.org>
date Wed, 16 Feb 2022 13:45:04 +0100
parents 95d6e3c9aa1e
children 7a60eaa9cb26
comparison
equal deleted inserted replaced
27743:629769fd1ff1 27744:515ce8e07bf2
1854 */ 1854 */
1855 if (c != p_wc && c == K_S_TAB && xpc.xp_numfiles > 0) 1855 if (c != p_wc && c == K_S_TAB && xpc.xp_numfiles > 0)
1856 c = Ctrl_P; 1856 c = Ctrl_P;
1857 1857
1858 #ifdef FEAT_WILDMENU 1858 #ifdef FEAT_WILDMENU
1859 c = wildmenu_translate_key(&ccline, c, &xpc, did_wild_list); 1859 if (p_wmnu)
1860 c = wildmenu_translate_key(&ccline, c, &xpc, did_wild_list);
1860 1861
1861 if (cmdline_pum_active()) 1862 if (cmdline_pum_active())
1862 { 1863 {
1863 // Ctrl-Y: Accept the current selection and close the popup menu. 1864 // Ctrl-Y: Accept the current selection and close the popup menu.
1864 // Ctrl-E: cancel the cmdline popup menu and return the original 1865 // Ctrl-E: cancel the cmdline popup menu and return the original
1898 wildmenu_cleanup(&ccline); 1899 wildmenu_cleanup(&ccline);
1899 #endif 1900 #endif
1900 } 1901 }
1901 1902
1902 #ifdef FEAT_WILDMENU 1903 #ifdef FEAT_WILDMENU
1903 c = wildmenu_process_key(&ccline, c, &xpc); 1904 if (p_wmnu)
1905 c = wildmenu_process_key(&ccline, c, &xpc);
1904 #endif 1906 #endif
1905 1907
1906 // CTRL-\ CTRL-N goes to Normal mode, CTRL-\ CTRL-G goes to Insert 1908 // CTRL-\ CTRL-N goes to Normal mode, CTRL-\ CTRL-G goes to Insert
1907 // mode when 'insertmode' is set, CTRL-\ e prompts for an expression. 1909 // mode when 'insertmode' is set, CTRL-\ e prompts for an expression.
1908 if (c == Ctrl_BSL) 1910 if (c == Ctrl_BSL)