# HG changeset patch # User one@zeus.cr.ie.u-ryukyu.ac.jp # Date 1292665624 -32400 # Node ID 01573c245f15930943c7f48ae0b0a2c4ac6981a1 # Parent c16898406ff2bbd31c05cc113d29f86dc5d498e0 fix for remote editor diff -r c16898406ff2 -r 01573c245f15 src/memline.c --- a/src/memline.c Fri Dec 17 17:43:06 2010 +0900 +++ b/src/memline.c Sat Dec 18 18:47:04 2010 +0900 @@ -48,6 +48,11 @@ #include "vim.h" +/* + Remote Editor + */ +#include "reditor.h" + #ifndef UNIX /* it's in os_unix.h for Unix */ # include #endif @@ -2541,6 +2546,13 @@ if (curbuf->b_ml.ml_line_lnum != 0) ml_flush_line(curbuf); + /* + * Remote Editor + */ + if (rep_permit()) { + rep_prevline_flush(lnum,1); + } + return ml_append_int(curbuf, lnum, line, len, newfile, FALSE); } @@ -2562,6 +2574,12 @@ if (buf->b_ml.ml_line_lnum != 0) ml_flush_line(buf); + /* + * Remote Editor + */ + if (rep_permit()) { + rep_prevline_flush(lnum,1); + } return ml_append_int(buf, lnum, line, len, newfile, FALSE); } #endif @@ -3083,6 +3101,12 @@ { if (line == NULL) /* just checking... */ return FAIL; + /* + * Remote Editor + */ + if (rep_permit()) { + rep_prevline_flush(lnum,0); + } /* When starting up, we might still need to create the memfile */ if (curbuf->b_ml.ml_mfp == NULL && open_buffer(FALSE, NULL, 0) == FAIL) @@ -3122,6 +3146,12 @@ int message; { ml_flush_line(curbuf); + /* + * Remote Editor + */ + if (rep_permit()) { + rep_prevline_flush(lnum, -1); + } return ml_delete_int(curbuf, lnum, message); } diff -r c16898406ff2 -r 01573c245f15 src/os_unix.c --- a/src/os_unix.c Fri Dec 17 17:43:06 2010 +0900 +++ b/src/os_unix.c Sat Dec 18 18:47:04 2010 +0900 @@ -5080,6 +5080,10 @@ maxfd = xsmp_icefd; } # endif + /* Remote Editor */ + if (rep_permit()) { + maxfd = rep_fd_set(&rfds, &efds, maxfd); + } #ifdef FEAT_NETBEANS_INTG if (nb_fd != -1) { @@ -5109,6 +5113,10 @@ /* loop if MzThreads must be scheduled and timeout occurred */ finished = FALSE; # endif + /* Remote Editor */ + if ((ret > 0 ) && (rep_permit())) { + rep_fd_check(fd, &rfds, &efds); + } # ifdef FEAT_SNIFF if (ret < 0 )