summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2004-12-29 21:03:02 +0000
committerBram Moolenaar <Bram@vim.org>2004-12-29 21:03:02 +0000
commit8fc061c7f7acb3e80d5fd64d89ad71486d88f5e0 (patch)
treebe2f34900b08a4a8c1dcb404e59452c72ea77a30 /src
parent81695250ef1bbc02016078044ac268129a33f333 (diff)
updated for version 7.0026v7.0026
Diffstat (limited to 'src')
-rw-r--r--src/eval.c15
-rw-r--r--src/main.c16
-rw-r--r--src/memline.c8
-rw-r--r--src/proto/quickfix.pro2
4 files changed, 20 insertions, 21 deletions
diff --git a/src/eval.c b/src/eval.c
index dcd86e519a..13a5b1bf6b 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -3427,25 +3427,12 @@ find_buffer(avar)
VAR avar;
{
buf_T *buf = NULL;
- char_u *name;
if (avar->var_type == VAR_NUMBER)
buf = buflist_findnr((int)avar->var_val.var_number);
else if (avar->var_val.var_string != NULL)
{
- /* First make the name into a full path name */
- name = FullName_save(avar->var_val.var_string,
-#ifdef UNIX
- TRUE /* force expansion, get rid of symbolic links */
-#else
- FALSE
-#endif
- );
- if (name != NULL)
- {
- buf = buflist_findname(name);
- vim_free(name);
- }
+ buf = buflist_findname_exp(avar->var_val.var_string);
if (buf == NULL)
{
/* No full path name match, try a match with a URL or a "nofile"
diff --git a/src/main.c b/src/main.c
index d71ef605fd..78639a2c22 100644
--- a/src/main.c
+++ b/src/main.c
@@ -141,7 +141,8 @@ main
int full_path = FALSE;
#endif
#ifdef FEAT_CLIENTSERVER
- char_u *serverStr = NULL;
+ char_u *serverStr = NULL; /* remote server command */
+ char_u *serverStrEnc = NULL; /* encoding of serverStr */
char_u *serverName_arg = NULL; /* cmdline arg for server name */
int serverArg = FALSE; /* TRUE when argument for a server */
char_u *servername = NULL; /* allocated name for our server */
@@ -378,10 +379,16 @@ main
/*
* When a command server argument was found, execute it. This may
- * exit Vim when it was successful.
+ * exit Vim when it was successful. Otherwise it's executed further
+ * on. Remember the encoding used here in "serverStrEnc".
*/
if (serverArg)
+ {
cmdsrv_main(&argc, argv, serverName_arg, &serverStr);
+# ifdef FEAT_MBYTE
+ serverStrEnc = vim_strsave(p_enc);
+# endif
+ }
/* If we're still running, get the name to register ourselves.
* On Win32 can register right now, for X11 need to setup the
@@ -1662,7 +1669,10 @@ scripterror:
* else we would have exited above).
*/
if (serverStr != NULL)
- server_to_input_buf(serverStr);
+ {
+ server_to_input_buf(serverConvert(serverStrEnc, serverStr, &p));
+ vim_free(p);
+ }
#endif
/*
diff --git a/src/memline.c b/src/memline.c
index 13f35c2afa..e18b895453 100644
--- a/src/memline.c
+++ b/src/memline.c
@@ -425,7 +425,8 @@ ml_setname(buf)
{
if (*dirp == NUL) /* tried all directories, fail */
break;
- fname = findswapname(buf, &dirp, mfp->mf_fname); /* alloc's fname */
+ fname = findswapname(buf, &dirp, mfp->mf_fname);
+ /* alloc's fname */
if (fname == NULL) /* no file name found for this dir */
continue;
@@ -529,7 +530,7 @@ ml_open_file(buf)
/* There is a small chance that between chosing the swap file name and
* creating it, another Vim creates the file. In that case the
* creation will fail and we will use another directory. */
- fname = findswapname(buf, &dirp, NULL); /* allocates fname */
+ fname = findswapname(buf, &dirp, NULL); /* allocates fname */
if (fname == NULL)
continue;
if (mf_open_file(mfp, fname) == OK) /* consumes fname! */
@@ -3731,7 +3732,8 @@ findswapname(buf, dirp, old_fname)
* viewing a help file or when the path of the file is different
* (happens when all .swp files are in one directory).
*/
- if (!recoverymode && buf->b_fname != NULL && !buf->b_help)
+ if (!recoverymode && buf->b_fname != NULL
+ && !buf->b_help && !(buf->b_flags & BF_DUMMY))
{
int fd;
struct block0 b0;
diff --git a/src/proto/quickfix.pro b/src/proto/quickfix.pro
index adec72f0fe..dbdca5f092 100644
--- a/src/proto/quickfix.pro
+++ b/src/proto/quickfix.pro
@@ -13,7 +13,7 @@ int bt_nofile __ARGS((buf_T *buf));
int bt_dontwrite __ARGS((buf_T *buf));
int bt_dontwrite_msg __ARGS((buf_T *buf));
int buf_hide __ARGS((buf_T *buf));
-int grep_internal __ARGS((exarg_T *eap));
+int grep_internal __ARGS((cmdidx_T cmdidx));
void ex_make __ARGS((exarg_T *eap));
void ex_cc __ARGS((exarg_T *eap));
void ex_cnext __ARGS((exarg_T *eap));