changeset 121:166759021e78

*** empty log message ***
author pin
date Sun, 23 Dec 2007 18:09:57 +0900
parents fa4085c9f2ad
children 43da9d272beb
files bin/remoteeditor/editors/RemoteEditor.class src/remoteeditor/editors/RemoteEditor.java
diffstat 2 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
Binary file bin/remoteeditor/editors/RemoteEditor.class has changed
--- a/src/remoteeditor/editors/RemoteEditor.java	Sun Dec 23 18:09:57 2007 +0900
+++ b/src/remoteeditor/editors/RemoteEditor.java	Sun Dec 23 18:09:57 2007 +0900
@@ -188,14 +188,14 @@
 	
 	private void sendInsert(int line) throws BadLocationException {
 		if(!lock){
-		int offset = document.getLineOffset(line-2);
-		int length = document.getLineLength(line-2);
+		int offset = document.getLineOffset(line-1);
+		int length = document.getLineLength(line-1);
 		String lineText = document.get(offset, length);
 		REPCommand usercmd = new REPCommand(REP.REPCMD_REPLACE, mysid, myeid, myseq, line, lineText.length(), lineText);
 		repsend.send(usercmd);
 		
-		offset = document.getLineOffset(line-1);
-		length = document.getLineLength(line-1);
+		offset = document.getLineOffset(line);
+		length = document.getLineLength(line);
 		lineText = document.get(offset, length);
 		usercmd = new REPCommand(REP.REPCMD_INSERT, mysid, myeid, myseq, line, lineText.length(), lineText);
 		repsend.send(usercmd);