comparison src/spell.c @ 1938:5ed9395c1864 v7.2.235

updated for version 7.2-235
author vimboss
date Wed, 22 Jul 2009 09:04:20 +0000
parents c8f343a465a2
children d433f43849ba
comparison
equal deleted inserted replaced
1937:d92bab35a167 1938:5ed9395c1864
10250 int mouse_used; 10250 int mouse_used;
10251 int need_cap; 10251 int need_cap;
10252 int limit; 10252 int limit;
10253 int selected = count; 10253 int selected = count;
10254 int badlen = 0; 10254 int badlen = 0;
10255 int msg_scroll_save = msg_scroll;
10255 10256
10256 if (no_spell_checking(curwin)) 10257 if (no_spell_checking(curwin))
10257 return; 10258 return;
10258 10259
10259 #ifdef FEAT_VISUAL 10260 #ifdef FEAT_VISUAL
10414 #endif 10415 #endif
10415 /* Ask for choice. */ 10416 /* Ask for choice. */
10416 selected = prompt_for_number(&mouse_used); 10417 selected = prompt_for_number(&mouse_used);
10417 if (mouse_used) 10418 if (mouse_used)
10418 selected -= lines_left; 10419 selected -= lines_left;
10419 lines_left = Rows; /* avoid more prompt */ 10420 lines_left = Rows; /* avoid more prompt */
10421 /* don't delay for 'smd' in normal_cmd() */
10422 msg_scroll = msg_scroll_save;
10420 } 10423 }
10421 10424
10422 if (selected > 0 && selected <= sug.su_ga.ga_len && u_save_cursor() == OK) 10425 if (selected > 0 && selected <= sug.su_ga.ga_len && u_save_cursor() == OK)
10423 { 10426 {
10424 /* Save the from and to text for :spellrepall. */ 10427 /* Save the from and to text for :spellrepall. */
10439 repl_from = vim_strnsave(sug.su_badptr, stp->st_orglen); 10442 repl_from = vim_strnsave(sug.su_badptr, stp->st_orglen);
10440 repl_to = vim_strsave(stp->st_word); 10443 repl_to = vim_strsave(stp->st_word);
10441 } 10444 }
10442 10445
10443 /* Replace the word. */ 10446 /* Replace the word. */
10444 p = alloc((unsigned)STRLEN(line) - stp->st_orglen + stp->st_wordlen + 1); 10447 p = alloc((unsigned)STRLEN(line) - stp->st_orglen
10448 + stp->st_wordlen + 1);
10445 if (p != NULL) 10449 if (p != NULL)
10446 { 10450 {
10447 c = (int)(sug.su_badptr - line); 10451 c = (int)(sug.su_badptr - line);
10448 mch_memmove(p, line, c); 10452 mch_memmove(p, line, c);
10449 STRCPY(p + c, stp->st_word); 10453 STRCPY(p + c, stp->st_word);