equal
deleted
inserted
replaced
4534 !EditTextView methodsFor:'editing-basic'! |
4534 !EditTextView methodsFor:'editing-basic'! |
4535 |
4535 |
4536 basicDeleteCharsAtLine:lineNr fromCol:startCol toCol:endCol |
4536 basicDeleteCharsAtLine:lineNr fromCol:startCol toCol:endCol |
4537 "delete characters from startCol to endCol in line lineNr" |
4537 "delete characters from startCol to endCol in line lineNr" |
4538 |
4538 |
4539 |line lineSize newLine start stop |
4539 |line lineSize newLine start stop |
4540 prevWidth newWidth newCol| |
4540 prevWidth newWidth newCol| |
4541 |
4541 |
4542 self unselect. |
4542 self unselect. |
4543 |
4543 |
4544 cursorLine == lineNr ifTrue:[ |
4544 cursorLine == lineNr ifTrue:[ |
4587 "/ only clear widthOfWidestLine, if this lines |
4587 "/ only clear widthOfWidestLine, if this lines |
4588 "/ length was (one of) the longest. |
4588 "/ length was (one of) the longest. |
4589 "/ avoids slow delete with huge texts. |
4589 "/ avoids slow delete with huge texts. |
4590 widthOfWidestLine := nil. "i.e. unknown" |
4590 widthOfWidestLine := nil. "i.e. unknown" |
4591 |
4591 |
4592 "/ scroll left if reqiured |
4592 "/ scroll left if required |
4593 viewOrigin x > 0 ifTrue:[ |
4593 viewOrigin x > 0 ifTrue:[ |
4594 newWidth := self widthOfLine:lineNr. |
4594 newWidth := self widthOfLine:lineNr. |
4595 newWidth < (viewOrigin x + width) ifTrue:[ |
4595 newWidth < (viewOrigin x + width) ifTrue:[ |
4596 self scrollHorizontalTo:(newWidth |
4596 self scrollHorizontalTo:(newWidth |
4597 - width |
4597 - width |
4609 self redrawLine:lineNr from:start. |
4609 self redrawLine:lineNr from:start. |
4610 ]. |
4610 ]. |
4611 ]. |
4611 ]. |
4612 |
4612 |
4613 "Modified: / 09-11-2010 / 13:42:45 / cg" |
4613 "Modified: / 09-11-2010 / 13:42:45 / cg" |
|
4614 "Modified (format): / 20-11-2017 / 20:17:55 / mawalch" |
4614 ! |
4615 ! |
4615 |
4616 |
4616 basicDeleteFromLine:startLineNr toLine:endLineNr |
4617 basicDeleteFromLine:startLineNr toLine:endLineNr |
4617 "delete some lines" |
4618 "delete some lines" |
4618 |
4619 |