comparison src/remoteeditor/editors/RemoteEditor.java @ 50:301c2dd245a2

*** empty log message ***
author pin
date Fri, 06 Apr 2007 05:28:05 +0900
parents cd196794b07f
children a7f5139f10b5
comparison
equal deleted inserted replaced
49:cd196794b07f 50:301c2dd245a2
151 151
152 public void run() { 152 public void run() {
153 try { 153 try {
154 lock = true; 154 lock = true;
155 //document.replace(offset, replaceLength, changedText); 155 //document.replace(offset, replaceLength, changedText);
156 document.replace(offset, replaceLength+1, changedText); 156 document.replace(offset, replaceLength, changedText);
157 lock = false; 157 lock = false;
158 } catch (BadLocationException e) { 158 } catch (BadLocationException e) {
159 e.printStackTrace(); 159 e.printStackTrace();
160 } 160 }
161 } 161 }
254 private void receiveReadCMD() throws BadLocationException { 254 private void receiveReadCMD() throws BadLocationException {
255 for(int i = 0; i < document.getNumberOfLines(); i++){ 255 for(int i = 0; i < document.getNumberOfLines(); i++){
256 int offset = document.getLineOffset(i); 256 int offset = document.getLineOffset(i);
257 int length = document.getLineLength(i); 257 int length = document.getLineLength(i);
258 String text = document.get(offset, length); 258 String text = document.get(offset, length);
259 repsend.send(new REPCommand(REP.REP_INSERT_CMD, mysid, myeid, myseq, i+1, text.length(), text)); 259 repsend.send(new REPCommand(REP.REP_INSERT_CMD, mysid, myeid, myseq, i, text.length(), text));
260 } 260 }
261 } 261 }
262 } 262 }