# HG changeset patch # User Jan Vrany # Date 1421763604 -3600 # Node ID 7e80c05b797b0fd8fa4a81f49abe81c6dcc34396 # Parent 68b527c9e71780c6ffce4c5cb6b56e0259dcd0ab Fix in Tools::CodeHighlightingService>>#setHighlightedCode:elements: Care for textView #cursorLine being nil or 0 (zero). I (JV) don't know when this happens but apparently it can happen. diff -r 68b527c9e717 -r 7e80c05b797b Tools__CodeHighlightingService.st --- a/Tools__CodeHighlightingService.st Tue Jan 20 14:18:44 2015 +0100 +++ b/Tools__CodeHighlightingService.st Tue Jan 20 15:20:04 2015 +0100 @@ -364,7 +364,7 @@ textView list:newLines. ] ifFalse:[ "/ the cursor line first - that's where your eyes are ... - (l := textView cursorLine) notNil ifTrue:[ + ((l := textView cursorLine) notNil and:[l between: 1 and: newLines size]) ifTrue:[ l <= newLines size ifTrue:[ replaceAction value:l value:(newLines at:l) ] @@ -385,20 +385,20 @@ "Created: / 14-02-2010 / 16:10:21 / Jan Vrany " "Modified (format): / 21-08-2011 / 09:38:22 / cg" "Modified: / 01-02-2012 / 19:18:00 / jv" - "Modified: / 16-10-2014 / 12:28:54 / Jan Vrany " + "Modified: / 20-01-2015 / 15:17:52 / Jan Vrany " ! ! !CodeHighlightingService class methodsFor:'documentation'! version - ^ '$Header: /cvs/stx/stx/libtool/Tools__CodeHighlightingService.st,v 1.51 2014-11-27 15:45:33 vrany Exp $' + ^ '$Header: /cvs/stx/stx/libtool/Tools__CodeHighlightingService.st,v 1.52 2015-01-20 14:20:04 vrany Exp $' ! version_CVS - ^ '$Header: /cvs/stx/stx/libtool/Tools__CodeHighlightingService.st,v 1.51 2014-11-27 15:45:33 vrany Exp $' + ^ '$Header: /cvs/stx/stx/libtool/Tools__CodeHighlightingService.st,v 1.52 2015-01-20 14:20:04 vrany Exp $' ! version_SVN - ^ '$Id: Tools__CodeHighlightingService.st,v 1.51 2014-11-27 15:45:33 vrany Exp $' + ^ '$Id: Tools__CodeHighlightingService.st,v 1.52 2015-01-20 14:20:04 vrany Exp $' ! !