home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / patches / 7.0 / 7.0.068 < prev    next >
Encoding:
Internet Message Format  |  2006-08-28  |  6.0 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 7.0.068
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. Mime-Version: 1.0
  6. Content-Type: text/plain; charset=ISO-8859-1
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 7.0.068
  11. Problem:    When 'ignorecase' is set and using Insert mode completion,
  12.         typing characters to change the list of matches, case is not
  13.         ignored. (Hugo Ahlenius)
  14. Solution:   Store the 'ignorecase' flag with the matches where needed.
  15. Files:        src/edit.c, src/search.c, src/spell.c
  16.  
  17.  
  18. *** ../vim-7.0.067/src/edit.c    Tue Aug 29 16:10:54 2006
  19. --- src/edit.c    Tue Aug 29 14:57:46 2006
  20. ***************
  21. *** 2405,2411 ****
  22.       /* compl_pattern doesn't need to be set */
  23.       compl_orig_text = vim_strnsave(ml_get_curline() + compl_col, compl_length);
  24.       if (compl_orig_text == NULL || ins_compl_add(compl_orig_text,
  25. !             -1, FALSE, NULL, NULL, 0, ORIGINAL_TEXT, FALSE) != OK)
  26.       return;
  27.   
  28.       /* Handle like dictionary completion. */
  29. --- 2405,2411 ----
  30.       /* compl_pattern doesn't need to be set */
  31.       compl_orig_text = vim_strnsave(ml_get_curline() + compl_col, compl_length);
  32.       if (compl_orig_text == NULL || ins_compl_add(compl_orig_text,
  33. !             -1, p_ic, NULL, NULL, 0, ORIGINAL_TEXT, FALSE) != OK)
  34.       return;
  35.   
  36.       /* Handle like dictionary completion. */
  37. ***************
  38. *** 2821,2827 ****
  39.               ptr = find_word_end(ptr);
  40.               add_r = ins_compl_add_infercase(regmatch->startp[0],
  41.                         (int)(ptr - regmatch->startp[0]),
  42. !                              FALSE, files[i], *dir, 0);
  43.               if (thesaurus)
  44.               {
  45.               char_u *wstart;
  46. --- 2821,2827 ----
  47.               ptr = find_word_end(ptr);
  48.               add_r = ins_compl_add_infercase(regmatch->startp[0],
  49.                         (int)(ptr - regmatch->startp[0]),
  50. !                              p_ic, files[i], *dir, 0);
  51.               if (thesaurus)
  52.               {
  53.               char_u *wstart;
  54. ***************
  55. *** 2857,2863 ****
  56.                   ptr = find_word_end(ptr);
  57.                   add_r = ins_compl_add_infercase(wstart,
  58.                       (int)(ptr - wstart),
  59. !                     FALSE, files[i], *dir, 0);
  60.               }
  61.               }
  62.               if (add_r == OK)
  63. --- 2857,2863 ----
  64.                   ptr = find_word_end(ptr);
  65.                   add_r = ins_compl_add_infercase(wstart,
  66.                       (int)(ptr - wstart),
  67. !                     p_ic, files[i], *dir, 0);
  68.               }
  69.               }
  70.               if (add_r == OK)
  71. ***************
  72. *** 3826,3832 ****
  73.               TAG_INS_COMP | (ctrl_x_mode ? TAG_VERBOSE : 0),
  74.               TAG_MANY, curbuf->b_ffname) == OK && num_matches > 0)
  75.           {
  76. !         ins_compl_add_matches(num_matches, matches, FALSE);
  77.           }
  78.           p_ic = save_p_ic;
  79.           break;
  80. --- 3826,3832 ----
  81.               TAG_INS_COMP | (ctrl_x_mode ? TAG_VERBOSE : 0),
  82.               TAG_MANY, curbuf->b_ffname) == OK && num_matches > 0)
  83.           {
  84. !         ins_compl_add_matches(num_matches, matches, p_ic);
  85.           }
  86.           p_ic = save_p_ic;
  87.           break;
  88. ***************
  89. *** 3867,3873 ****
  90.           num_matches = expand_spelling(first_match_pos.lnum,
  91.                    first_match_pos.col, compl_pattern, &matches);
  92.           if (num_matches > 0)
  93. !         ins_compl_add_matches(num_matches, matches, FALSE);
  94.   #endif
  95.           break;
  96.   
  97. --- 3867,3873 ----
  98.           num_matches = expand_spelling(first_match_pos.lnum,
  99.                    first_match_pos.col, compl_pattern, &matches);
  100.           if (num_matches > 0)
  101. !         ins_compl_add_matches(num_matches, matches, p_ic);
  102.   #endif
  103.           break;
  104.   
  105. ***************
  106. *** 4001,4007 ****
  107.                   continue;
  108.               }
  109.           }
  110. !         if (ins_compl_add_infercase(ptr, len, FALSE,
  111.                    ins_buf == curbuf ? NULL : ins_buf->b_sfname,
  112.                          0, flags) != NOTDONE)
  113.           {
  114. --- 4001,4007 ----
  115.                   continue;
  116.               }
  117.           }
  118. !         if (ins_compl_add_infercase(ptr, len, p_ic,
  119.                    ins_buf == curbuf ? NULL : ins_buf->b_sfname,
  120.                          0, flags) != NOTDONE)
  121.           {
  122. ***************
  123. *** 4809,4815 ****
  124.       vim_free(compl_orig_text);
  125.       compl_orig_text = vim_strnsave(line + compl_col, compl_length);
  126.       if (compl_orig_text == NULL || ins_compl_add(compl_orig_text,
  127. !             -1, FALSE, NULL, NULL, 0, ORIGINAL_TEXT, FALSE) != OK)
  128.       {
  129.           vim_free(compl_pattern);
  130.           compl_pattern = NULL;
  131. --- 4809,4815 ----
  132.       vim_free(compl_orig_text);
  133.       compl_orig_text = vim_strnsave(line + compl_col, compl_length);
  134.       if (compl_orig_text == NULL || ins_compl_add(compl_orig_text,
  135. !             -1, p_ic, NULL, NULL, 0, ORIGINAL_TEXT, FALSE) != OK)
  136.       {
  137.           vim_free(compl_pattern);
  138.           compl_pattern = NULL;
  139. *** ../vim-7.0.067/src/search.c    Fri May  5 23:15:17 2006
  140. --- src/search.c    Tue Aug 29 14:56:15 2006
  141. ***************
  142. *** 4871,4877 ****
  143.               goto exit_matched;
  144.           }
  145.   
  146. !         add_r = ins_compl_add_infercase(aux, i, FALSE,
  147.               curr_fname == curbuf->b_fname ? NULL : curr_fname,
  148.               dir, reuse);
  149.           if (add_r == OK)
  150. --- 4876,4882 ----
  151.               goto exit_matched;
  152.           }
  153.   
  154. !         add_r = ins_compl_add_infercase(aux, i, p_ic,
  155.               curr_fname == curbuf->b_fname ? NULL : curr_fname,
  156.               dir, reuse);
  157.           if (add_r == OK)
  158. *** ../vim-7.0.067/src/spell.c    Sun Jul 23 21:52:16 2006
  159. --- src/spell.c    Tue Aug 29 14:56:26 2006
  160. ***************
  161. *** 15658,15664 ****
  162.               ? MB_STRNICMP(p, pat, STRLEN(pat)) == 0
  163.               : STRNCMP(p, pat, STRLEN(pat)) == 0)
  164.           && ins_compl_add_infercase(p, (int)STRLEN(p),
  165. !                       FALSE, NULL, *dir, 0) == OK)
  166.       /* if dir was BACKWARD then honor it just once */
  167.       *dir = FORWARD;
  168.   }
  169. --- 15662,15668 ----
  170.               ? MB_STRNICMP(p, pat, STRLEN(pat)) == 0
  171.               : STRNCMP(p, pat, STRLEN(pat)) == 0)
  172.           && ins_compl_add_infercase(p, (int)STRLEN(p),
  173. !                       p_ic, NULL, *dir, 0) == OK)
  174.       /* if dir was BACKWARD then honor it just once */
  175.       *dir = FORWARD;
  176.   }
  177. *** ../vim-7.0.067/src/version.c    Tue Aug 29 16:10:54 2006
  178. --- src/version.c    Tue Aug 29 16:13:49 2006
  179. ***************
  180. *** 668,669 ****
  181. --- 668,671 ----
  182.   {   /* Add new patch number below this line */
  183. + /**/
  184. +     68,
  185.   /**/
  186.  
  187. -- 
  188. hundred-and-one symptoms of being an internet addict:
  189. 266. You hear most of your jokes via e-mail instead of in person.
  190.  
  191.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  192. ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  193. \\\        download, build and distribute -- http://www.A-A-P.org        ///
  194.  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
  195.