comparison src/eval.c @ 43:f55897d6921d v7.0026

updated for version 7.0026
author vimboss
date Wed, 29 Dec 2004 21:03:02 +0000
parents f529edb9bab3
children 8c25f10d49e7
comparison
equal deleted inserted replaced
42:c75153d791d0 43:f55897d6921d
3425 static buf_T * 3425 static buf_T *
3426 find_buffer(avar) 3426 find_buffer(avar)
3427 VAR avar; 3427 VAR avar;
3428 { 3428 {
3429 buf_T *buf = NULL; 3429 buf_T *buf = NULL;
3430 char_u *name;
3431 3430
3432 if (avar->var_type == VAR_NUMBER) 3431 if (avar->var_type == VAR_NUMBER)
3433 buf = buflist_findnr((int)avar->var_val.var_number); 3432 buf = buflist_findnr((int)avar->var_val.var_number);
3434 else if (avar->var_val.var_string != NULL) 3433 else if (avar->var_val.var_string != NULL)
3435 { 3434 {
3436 /* First make the name into a full path name */ 3435 buf = buflist_findname_exp(avar->var_val.var_string);
3437 name = FullName_save(avar->var_val.var_string,
3438 #ifdef UNIX
3439 TRUE /* force expansion, get rid of symbolic links */
3440 #else
3441 FALSE
3442 #endif
3443 );
3444 if (name != NULL)
3445 {
3446 buf = buflist_findname(name);
3447 vim_free(name);
3448 }
3449 if (buf == NULL) 3436 if (buf == NULL)
3450 { 3437 {
3451 /* No full path name match, try a match with a URL or a "nofile" 3438 /* No full path name match, try a match with a URL or a "nofile"
3452 * buffer, these don't use the full path. */ 3439 * buffer, these don't use the full path. */
3453 for (buf = firstbuf; buf != NULL; buf = buf->b_next) 3440 for (buf = firstbuf; buf != NULL; buf = buf->b_next)