comparison src/insexpand.c @ 19051:c6248ef5b41b v8.2.0086

patch 8.2.0086: build error for small version Commit: https://github.com/vim/vim/commit/ab782c5b6f127b84f56e546004352de66e7cf66b Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jan 4 19:00:11 2020 +0100 patch 8.2.0086: build error for small version Problem: Build error for small version. (Tony Mechelynck) Solution: Only use "user_data" with the +eval feature. Remove unused variable.
author Bram Moolenaar <Bram@vim.org>
date Sat, 04 Jan 2020 19:15:04 +0100
parents a3fce2763e83
children 0ee48dc3f8bc
comparison
equal deleted inserted replaced
19050:4daf5054ae02 19051:c6248ef5b41b
101 { 101 {
102 compl_T *cp_next; 102 compl_T *cp_next;
103 compl_T *cp_prev; 103 compl_T *cp_prev;
104 char_u *cp_str; // matched text 104 char_u *cp_str; // matched text
105 char_u *(cp_text[CPT_COUNT]); // text for the menu 105 char_u *(cp_text[CPT_COUNT]); // text for the menu
106 #ifdef FEAT_EVAL
106 typval_T cp_user_data; 107 typval_T cp_user_data;
108 #endif
107 char_u *cp_fname; // file containing the match, allocated when 109 char_u *cp_fname; // file containing the match, allocated when
108 // cp_flags has CP_FREE_FNAME 110 // cp_flags has CP_FREE_FNAME
109 int cp_flags; // CP_ values 111 int cp_flags; // CP_ values
110 int cp_number; // sequence number 112 int cp_number; // sequence number
111 }; 113 };
645 647
646 for (i = 0; i < CPT_COUNT; ++i) 648 for (i = 0; i < CPT_COUNT; ++i)
647 if (cptext[i] != NULL && *cptext[i] != NUL) 649 if (cptext[i] != NULL && *cptext[i] != NUL)
648 match->cp_text[i] = vim_strsave(cptext[i]); 650 match->cp_text[i] = vim_strsave(cptext[i]);
649 } 651 }
652 #ifdef FEAT_EVAL
650 if (user_data != NULL) 653 if (user_data != NULL)
651 match->cp_user_data = *user_data; 654 match->cp_user_data = *user_data;
655 #endif
652 656
653 // Link the new match structure in the list of matches. 657 // Link the new match structure in the list of matches.
654 if (compl_first_match == NULL) 658 if (compl_first_match == NULL)
655 match->cp_next = match->cp_prev = NULL; 659 match->cp_next = match->cp_prev = NULL;
656 else if (dir == FORWARD) 660 else if (dir == FORWARD)
1457 // several entries may use the same fname, free it just once. 1461 // several entries may use the same fname, free it just once.
1458 if (match->cp_flags & CP_FREE_FNAME) 1462 if (match->cp_flags & CP_FREE_FNAME)
1459 vim_free(match->cp_fname); 1463 vim_free(match->cp_fname);
1460 for (i = 0; i < CPT_COUNT; ++i) 1464 for (i = 0; i < CPT_COUNT; ++i)
1461 vim_free(match->cp_text[i]); 1465 vim_free(match->cp_text[i]);
1466 #ifdef FEAT_EVAL
1462 clear_tv(&match->cp_user_data); 1467 clear_tv(&match->cp_user_data);
1468 #endif
1463 vim_free(match); 1469 vim_free(match);
1464 } while (compl_curr_match != NULL && compl_curr_match != compl_first_match); 1470 } while (compl_curr_match != NULL && compl_curr_match != compl_first_match);
1465 compl_first_match = compl_curr_match = NULL; 1471 compl_first_match = compl_curr_match = NULL;
1466 compl_shown_match = NULL; 1472 compl_shown_match = NULL;
1467 compl_old_match = NULL; 1473 compl_old_match = NULL;