Mercurial > hg > RemoteEditor > vim7
changeset 3:beaeafecd1cd
fix: rep_put
author | atsuki |
---|---|
date | Sun, 11 Nov 2007 00:16:13 +0900 |
parents | 7c2dca099a7b |
children | 7d3c79a9b40a |
files | src/ex_docmd.c src/reditor.c |
diffstat | 2 files changed, 16 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ex_docmd.c Sat Nov 10 21:16:07 2007 +0900 +++ b/src/ex_docmd.c Sun Nov 11 00:16:13 2007 +0900 @@ -10971,7 +10971,7 @@ } } else { MSG(_("[REP MODE] start with file")); - if (rep_put(curbuf->b_ffname) == FALSE) { + if (rep_put(curbuf->b_sfname) == FALSE) { rep_end(); } } @@ -10983,4 +10983,5 @@ exarg_T *eap; { MSG(_("[REP MODE] end")); -} + rep_end(); +}
--- a/src/reditor.c Sat Nov 10 21:16:07 2007 +0900 +++ b/src/reditor.c Sun Nov 11 00:16:13 2007 +0900 @@ -1138,26 +1138,22 @@ rep_put(sname) char *sname; { + int sock; rep_T *rep = get_rep(); rep_cmdlist cmdlist = {NULL, 0}; - char *server = NULL; int len; Session *sn; - while (rep->smfd < 0) { /* Until does NOT connect to Session Manager */ - server = rep_input_param("Session Manager = ", NULL); - /* - if (server == NULL) { // input nothing means cancel - return FALSE; - } - */ - if ((rep->smfd = rep_connect(server)) < 0) { - free_wrp(server); - return FALSE; - } - free_wrp(server); + if ((sock = rep_connect(NULL)) < 0) { + return FALSE; } - + if (rep->smfd > 0) { + close(rep->smfd); + } + + rep->smfd = sock; + rep->permit = TRUE; + if (sname == NULL) { /* get current buffer name */ if ((sname = get_fullpath(rep->cursession)) == NULL) { @@ -1165,10 +1161,13 @@ } } + /* if (find_session_by_name(sname) == NULL) { sn = make_session(sname, get_buf_by_name(sname)); register_session(sn); } + */ + if (rep->waiting_session_name) { rep_free(rep->waiting_session_name);