Changeset 356
- Timestamp:
- 09/14/08 17:20:03 (4 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
jasko.tim.lisp/src/jasko/tim/lisp/editors/LispEditor.java
r354 r356 232 232 IDocument doc = editor2.getDocumentProvider() 233 233 .getDocument(editor2.getEditorInput()); 234 234 235 String contents = doc.get(); 235 236 236 if (symbol == null) { 237 237 //System.out.println("A0 " + snippet); 238 238 //FIXME: should skip strings and comments 239 239 int offset = contents.indexOf(snippet, position); 240 240 if (offset >= 0) { … … 247 247 } else { 248 248 //System.out.println("B0"); 249 int offset = contents.indexOf(symbol, position); 249 // skip comments or strings 250 int iters = 0; 251 int offset = position; 252 while( offset >= 0 && offset < doc.getLength() && 253 (doc.getPartition(offset) 254 .getType().equals(LispPartitionScanner.LISP_COMMENT) 255 || doc.getPartition(offset) 256 .getType().equals(LispPartitionScanner.LISP_STRING))){ 257 offset = contents.indexOf(symbol,offset)+symbol.length(); 258 ++iters; 259 } 260 if( iters > 0 ){ 261 offset -= symbol.length(); 262 } 250 263 if (offset >= 0) { 251 264 //System.out.println("B1 " + offset); jasko.tim.lisp/src/jasko/tim/lisp/swank/SwankInterface.java
r354 r356 755 755 String res = sendEvalAndGrab(msg,2000); 756 756 757 return (!(res.equalsIgnoreCase("nil") || res.contains(":ERROR")));757 return (!(res.equalsIgnoreCase("nil") || (res.contains(":ERROR") && !res.contains(":LOCATION")))); 758 758 } 759 759
