395 ! ! |
395 ! ! |
396 |
396 |
397 !TextView methodsFor:'accessing'! |
397 !TextView methodsFor:'accessing'! |
398 |
398 |
399 characterPositionOfSelection |
399 characterPositionOfSelection |
400 "return the character index of the first character in the selection" |
400 "return the character index of the first character in the selection. |
401 |
401 Returns 0 if there is no selection." |
402 selectionStartLine isNil ifTrue:[^ 1]. |
402 |
|
403 selectionStartLine isNil ifTrue:[^ 0]. |
403 ^ self characterPositionOfLine:selectionStartLine |
404 ^ self characterPositionOfLine:selectionStartLine |
404 col:selectionStartCol |
405 col:selectionStartCol |
|
406 |
|
407 "Modified: 14.8.1997 / 16:35:37 / cg" |
|
408 ! |
|
409 |
|
410 characterPositionOfSelectionEnd |
|
411 "return the character index of the last character in the selection. |
|
412 Returns 0 if there is no selection." |
|
413 |
|
414 selectionStartLine isNil ifTrue:[^ 0]. |
|
415 ^ self characterPositionOfLine:selectionEndLine |
|
416 col:selectionEndCol |
|
417 |
|
418 "Created: 14.8.1997 / 16:35:24 / cg" |
|
419 "Modified: 14.8.1997 / 16:35:45 / cg" |
405 ! |
420 ! |
406 |
421 |
407 contentsWasSaved |
422 contentsWasSaved |
408 "return true, if the contents was saved (by a save action), |
423 "return true, if the contents was saved (by a save action), |
409 false if not (or was modified again after the last save)." |
424 false if not (or was modified again after the last save)." |