Mercurial > hg > RemoteEditor > vim7
changeset 24:e7d30a296a9b
*** empty log message ***
author | kono |
---|---|
date | Wed, 24 Sep 2008 21:22:42 +0900 |
parents | 75fedd8da66f |
children | 2d27043cb96b |
files | src/reditor.c |
diffstat | 1 files changed, 23 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/reditor.c Wed Sep 24 18:11:41 2008 +0900 +++ b/src/reditor.c Wed Sep 24 21:22:42 2008 +0900 @@ -939,6 +939,7 @@ if (xtra<0) { // delete case, the command was sent, do nothing assert(cursn->del_cmd==0); + cursn->prevline=-1; } else if (xtra>0) { // append case @@ -947,6 +948,7 @@ cmd = make_cmd(REP_INSERT_CMD, cursn->sid, rep->eid, rep->seqno++, i+1, get_memline_wrp(cursn->buf, i+1)); add_cmd_to_list(&(cursn->new_cmdlist), cmd); } + cursn->prevline=-1; rep_send_cur_cmdlist(); } else if (xtra==0) { // replace case @@ -960,6 +962,7 @@ } else { // first insert case? } + cursn->prevline = lnum; // send saved new line as INSERT command cmd = make_cmd(REP_INSERT_CMD, cursn->sid, rep->eid, rep->seqno++, cursn->prevline, get_memline_wrp(cursn->buf, lnum)); @@ -1416,3 +1419,23 @@ return TRUE; } +extern void +pcmd(cmd_p) + rep_cmd *cmd_p; +{ + int i; + fprintf(stderr,"cmd=%04x",cmd_p->cmd ); + fprintf(stderr,"sid=%08x", cmd_p->sid); + fprintf(stderr,"eid=%08x", cmd_p->eid); + fprintf(stderr,"seq=%08x", cmd_p->seq); + fprintf(stderr,"lineno=%08x", cmd_p->lnum); + fprintf(stderr,"sz=%08x", cmd_p->len); + + fprintf(stderr,"\n"); + for(i=0;i<cmd_p->len+REP_HEADER_SIZE;i++) { + fprintf(stderr,"%02x ", cmd_p->pkt[i]); + } + fprintf(stderr,"\n"); +} + +