comment/format in: #characterPositionOfLine:col:
authorClaus Gittinger <cg@exept.de>
Wed, 24 Oct 2012 12:31:56 +0200
changeset 4468 6d711c19c529
parent 4467 746be61eb7f2
child 4469 f8c7c57c8c90
comment/format in: #characterPositionOfLine:col:
ListView.st
--- a/ListView.st	Tue Oct 23 19:19:58 2012 +0200
+++ b/ListView.st	Wed Oct 24 12:31:56 2012 +0200
@@ -2972,26 +2972,26 @@
 
 characterPositionOfLine:lineNr col:colArg
     "given a line/col position, return the character index within the contents-string,
-     - used with Compilers error-positioning, which is based on character positions
+     - used with compiler's error-positioning, which is based on character positions
      of the contents-string."
 
-    |lineString pos lineEndCharSize col|
+    |lineString charPos lineEndCharSize col|
 
     lineEndCharSize := self lineEndCRLF ifTrue:[2] ifFalse:[1].
 
     self checkForExistingLine:lineNr.
-    pos := 1.
+    charPos := 1.
     1 to:(lineNr - 1) do:[:lnr |
         lineString := self at:lnr.
         lineString notNil ifTrue:[
-            pos := pos + (lineString string "withoutTrailingSeparators") size
+            charPos := charPos + (lineString string "withoutTrailingSeparators") size
         ].
-        pos := pos + lineEndCharSize   "the return-character"
+        charPos := charPos + lineEndCharSize   "the return-character"
     ].
 
     "/ if beyond end of line, do not advance into next line
     col := colArg min:(self at:lineNr) size.
-    ^ pos + col - 1
+    ^ charPos + col - 1
 
     "Modified: / 04-07-2006 / 19:14:25 / fm"
     "Modified: / 21-08-2011 / 11:03:19 / cg"
@@ -4848,5 +4848,5 @@
 !ListView class methodsFor:'documentation'!
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libwidg/ListView.st,v 1.355 2012-10-23 12:59:09 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/ListView.st,v 1.356 2012-10-24 10:31:56 cg Exp $'
 ! !