Mercurial > vim
comparison src/tag.c @ 1521:cc4fe241baa3 v7.1.236
updated for version 7.1-236
author | vimboss |
---|---|
date | Sat, 19 Jan 2008 14:59:58 +0000 |
parents | a3c21128b246 |
children | 0d0bf7598dcb |
comparison
equal
deleted
inserted
replaced
1520:cd6175cc27d9 | 1521:cc4fe241baa3 |
---|---|
3189 add_to_history(HIST_SEARCH, pbuf + 1, TRUE, pbuf[0]); | 3189 add_to_history(HIST_SEARCH, pbuf + 1, TRUE, pbuf[0]); |
3190 #endif | 3190 #endif |
3191 #endif | 3191 #endif |
3192 save_lnum = curwin->w_cursor.lnum; | 3192 save_lnum = curwin->w_cursor.lnum; |
3193 curwin->w_cursor.lnum = 0; /* start search before first line */ | 3193 curwin->w_cursor.lnum = 0; /* start search before first line */ |
3194 if (do_search(NULL, pbuf[0], pbuf + 1, (long)1, search_options)) | 3194 if (do_search(NULL, pbuf[0], pbuf + 1, (long)1, |
3195 search_options, NULL)) | |
3195 retval = OK; | 3196 retval = OK; |
3196 else | 3197 else |
3197 { | 3198 { |
3198 int found = 1; | 3199 int found = 1; |
3199 int cc; | 3200 int cc; |
3201 /* | 3202 /* |
3202 * try again, ignore case now | 3203 * try again, ignore case now |
3203 */ | 3204 */ |
3204 p_ic = TRUE; | 3205 p_ic = TRUE; |
3205 if (!do_search(NULL, pbuf[0], pbuf + 1, (long)1, | 3206 if (!do_search(NULL, pbuf[0], pbuf + 1, (long)1, |
3206 search_options)) | 3207 search_options, NULL)) |
3207 { | 3208 { |
3208 /* | 3209 /* |
3209 * Failed to find pattern, take a guess: "^func (" | 3210 * Failed to find pattern, take a guess: "^func (" |
3210 */ | 3211 */ |
3211 found = 2; | 3212 found = 2; |
3212 (void)test_for_static(&tagp); | 3213 (void)test_for_static(&tagp); |
3213 cc = *tagp.tagname_end; | 3214 cc = *tagp.tagname_end; |
3214 *tagp.tagname_end = NUL; | 3215 *tagp.tagname_end = NUL; |
3215 sprintf((char *)pbuf, "^%s\\s\\*(", tagp.tagname); | 3216 sprintf((char *)pbuf, "^%s\\s\\*(", tagp.tagname); |
3216 if (!do_search(NULL, '/', pbuf, (long)1, search_options)) | 3217 if (!do_search(NULL, '/', pbuf, (long)1, |
3218 search_options, NULL)) | |
3217 { | 3219 { |
3218 /* Guess again: "^char * \<func (" */ | 3220 /* Guess again: "^char * \<func (" */ |
3219 sprintf((char *)pbuf, "^\\[#a-zA-Z_]\\.\\*\\<%s\\s\\*(", | 3221 sprintf((char *)pbuf, "^\\[#a-zA-Z_]\\.\\*\\<%s\\s\\*(", |
3220 tagp.tagname); | 3222 tagp.tagname); |
3221 if (!do_search(NULL, '/', pbuf, (long)1, | 3223 if (!do_search(NULL, '/', pbuf, (long)1, |
3222 search_options)) | 3224 search_options, NULL)) |
3223 found = 0; | 3225 found = 0; |
3224 } | 3226 } |
3225 *tagp.tagname_end = cc; | 3227 *tagp.tagname_end = cc; |
3226 } | 3228 } |
3227 if (found == 0) | 3229 if (found == 0) |