#OTHER
authorClaus Gittinger <cg@exept.de>
Sun, 18 Oct 2015 03:19:07 +0200
changeset 15908 80f06811ff1d
parent 15906 1c4d247a06d9
child 15909 4a1d960d0fd1
child 15910 9eff8cc5956c
#OTHER class: FileApplicationNoteBook showLastPart was buggy when showing contents of large file and user selects "last part" in dialog.
FileApplicationNoteBook.st
--- 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