changeset 23:24f5a9614d78

*** empty log message ***
author pin
date Tue, 14 Nov 2006 14:31:59 +0900
parents 988d3c25ff91
children e9b015eb1e05
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	Tue Nov 14 04:15:46 2006 +0900
+++ b/src/remoteeditor/editors/RemoteEditor.java	Tue Nov 14 14:31:59 2006 +0900
@@ -77,10 +77,10 @@
 		System.out.println("numberOfLinesOld : " + numberOfLinesOld + "," + "numberOfLinesNew : " + numberOfLinesNew);
 	}
 	
-	void replaceInsertDelete(int kindOfCmd, int lineNo, int LineLength, String text) throws BadLocationException{
-		final int offset = document.getLineOffset(lineNo);
+	void replaceInsertDelete(int kindOfCmd, int lineNo, int LineLength, String text) throws Exception{
+		final int offset = document.getLineOffset(lineNo-1);
 		final String changedText = text;
-		final int replaceLength = document.getLineLength(lineNo);
+		final int replaceLength = document.getLineLength(lineNo-1);
 		
 		viewer.getTextWidget().getDisplay().syncExec(new Runnable() {
 			public void run() {
@@ -99,7 +99,7 @@
 		final String text = evt.getText();
 		try {
 			replaceInsertDelete(evt.getCmd(), lineNo, Linelength, text);
-		} catch (BadLocationException e) {
+		} catch (Exception e) {
 			e.printStackTrace();
 		}
 	}