changeset 39:188f09aff2be

*** empty log message ***
author pin
date Fri, 06 Apr 2007 02:52:24 +0900
parents 99dc7f13ed80
children 3368e6c94f11
files bin/remoteeditor/editors/RemoteEditor$1.class bin/remoteeditor/editors/RemoteEditor.class src/remoteeditor/editors/RemoteEditor.java
diffstat 3 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
Binary file bin/remoteeditor/editors/RemoteEditor$1.class has changed
Binary file bin/remoteeditor/editors/RemoteEditor.class has changed
--- a/src/remoteeditor/editors/RemoteEditor.java	Fri Apr 06 02:36:23 2007 +0900
+++ b/src/remoteeditor/editors/RemoteEditor.java	Fri Apr 06 02:52:24 2007 +0900
@@ -48,6 +48,7 @@
 	private int myseq = 0;
 	private int mysid = 0;
 	private String filename = "afro";
+	protected boolean lock;
 	
 	public RemoteEditor() {
 		super();
@@ -134,7 +135,7 @@
 			cmd = REP.REP_DELETE_CMD;
 		}
 		//rep.sendCmd(cmd, line, length, lineText);
-		repsend.send(new REPCommand(cmd, mysid, myeid, myseq, line, lineText.length(), lineText));
+		if(!lock) repsend.send(new REPCommand(cmd, mysid, myeid, myseq, line, lineText.length(), lineText));
 		numberOfLinesOld = numberOfLinesNew;
 	}
 	
@@ -145,7 +146,9 @@
 		viewer.getTextWidget().getDisplay().syncExec(new Runnable() {
 			public void run() {
 				try {
+					lock = true;
 					document.replace(offset, replaceLength, changedText);
+					lock = false;
 				} catch (BadLocationException e) {
 					e.printStackTrace();
 				}