Mercurial > hg > RemoteEditor > vim7
changeset 12:f0f9a028aa7c
*** empty log message ***
author | shinobu |
---|---|
date | Sat, 30 Aug 2008 21:30:44 +0900 |
parents | bb64d8561b7b |
children | c8b79e6953b5 |
files | src/reditor.c |
diffstat | 1 files changed, 19 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/src/reditor.c Sat Aug 30 15:13:39 2008 +0900 +++ b/src/reditor.c Sat Aug 30 21:30:44 2008 +0900 @@ -1493,7 +1493,11 @@ text = get_memline_wrp(cursn->buf, cursn->prevline); - cmd = make_cmd(REP_REPLACE_CMD, cursn->sid, rep->eid, rep->seqno++, cursn->prevline, text); + //cmd = make_cmd(REP_REPLACE_CMD, cursn->sid, rep->eid, rep->seqno++, cursn->prevline, text); + + // TODO : 変更前のテキストを UNDO バッファから取得する + cmd = make_cmd(REP_DELETE_CMD, cursn->sid, rep->eid, rep->seqno++, cursn->prevline, prev_text); + cmd->next = make_cmd(REP_INSERT_CMD, cursn->sid, rep->eid, rep->seqno++, cursn->prevline, text); add_cmd_to_list(&(cursn->new_cmdlist), cmd); @@ -1660,6 +1664,7 @@ rep->eid = eid; } break; +/* case REP_SELECT_ACK: // text is error message. means occur ERROR in session manager if (text) { @@ -1684,10 +1689,11 @@ rep_start_create_cmds(); - /* get window size */ - /* send read command */ + // get window size + // send read command break; case REP_REGISTER_ACK: +*/ case REP_PUT_ACK: /* Enter Session */ @@ -1711,6 +1717,7 @@ rep_start_create_cmds(); break; +/* case REP_DEREGISTER_CMD: case REP_DEREGISTER_ACK: case REP_QUIT_CMD: @@ -1719,11 +1726,9 @@ case REP_GET_ACK: break; case REP_OPEN_CMD: - /* REP_OPEN_CMD is handled in list part. (may be upper function) */ + // REP_OPEN_CMD is handled in list part. (may be upper function) break; - /* connection commands */ - case REP_OPEN_ACK: case REP_CLOSE_CMD: break; @@ -1735,20 +1740,23 @@ break; case REP_READ_FIN: break; - /* buffer edit commands */ - /* session's buffer is set to current buffer */ + // buffer edit commands + // session's buffer is set to current buffer +*/ case REP_INSERT_CMD: append_memline_wrp(lnum, text); break; case REP_DELETE_LINE_CMD: delete_memline_wrp(lnum); break; +/* case REP_REPLACE_CMD: if (lnum > get_bufmaxline_wrp(session->buf)) { append_memline_wrp(lnum, text); } - replace_memline_wrp(lnum, text); /* text was allocated */ + replace_memline_wrp(lnum, text); // text was allocated break; +*/ default: break; } @@ -2060,9 +2068,11 @@ return FALSE; } /* Session ごとに行う↓*/ + /* for(sn = rep_p->shead; sn ; sn = sn->next) { translate( &sn->new_cmdlist , &txtcmdlist); } + */ del_ignored_cmd(&txtcmdlist); rep_exe_pktlist(&txtcmdlist);