#OTHER
class: FileApplicationNoteBook
showLastPart was buggy when showing contents of large file
and user selects "last part" in dialog.
--- a/FileApplicationNoteBook.st Thu Oct 15 23:25:47 2015 +0200
+++ b/FileApplicationNoteBook.st Sun Oct 18 03:19:07 2015 +0200
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
"
COPYRIGHT (c) 2002 by eXept Software AG
All Rights Reserved
@@ -5673,11 +5671,12 @@
^ self getContentsAsTextWithSizeLimit:sizeLimitOrNil lastPart:false
!
-getContentsAsTextWithSizeLimit:sizeLimitOrNil lastPart:showLastPartOrNil
+getContentsAsTextWithSizeLimit:sizeLimitOrNilArg lastPart:showLastPartOrNil
"returns the contents as unicode"
- |text guessedEncoding s|
-
+ |text guessedEncoding s sizeLimitOrNil|
+
+ sizeLimitOrNil := sizeLimitOrNilArg.
(self lockFileEncodingHolder value ? false) ifFalse:[
guessedEncoding := CharacterEncoder guessEncodingOfFile:item fileName asFilename.
guessedEncoding := guessedEncoding ? #'iso8859-1' "(self fileEncoding)".
@@ -5693,6 +5692,7 @@
[
showLastPartOrNil == true ifTrue:[
s position:(s fileSize - sizeLimitOrNil).
+ sizeLimitOrNil := nil.
].
text := self