diff options
author | fvogelnew1@free.fr <fvogel> | 2016-03-27 15:25:22 (GMT) |
---|---|---|
committer | fvogelnew1@free.fr <fvogel> | 2016-03-27 15:25:22 (GMT) |
commit | 6c998100929c0ab0c3ae5e7a106c957177ab98db (patch) | |
tree | 0dd6bfd881f87860ca526ac23cda6653a861d285 /doc | |
parent | 714df3417816e052663f4807bb248f90ba355651 (diff) | |
parent | 8993806e2ab211b67cb0fc3eb62811a88e50b65c (diff) | |
download | tk-6c998100929c0ab0c3ae5e7a106c957177ab98db.zip tk-6c998100929c0ab0c3ae5e7a106c957177ab98db.tar.gz tk-6c998100929c0ab0c3ae5e7a106c957177ab98db.tar.bz2 |
Fixed [18c08df753] - Change of behaviour for text widget last newline
Diffstat (limited to 'doc')
-rw-r--r-- | doc/text.n | 40 |
1 files changed, 24 insertions, 16 deletions
@@ -1173,22 +1173,30 @@ test suite. .TP \fIpathName \fBdelete \fIindex1 \fR?\fIindex2 ...\fR? . -Delete a range of characters from the text. If both \fIindex1\fR and -\fIindex2\fR are specified, then delete all the characters starting with the -one given by \fIindex1\fR and stopping just before \fIindex2\fR (i.e. the -character at \fIindex2\fR is not deleted). If \fIindex2\fR does not specify a -position later in the text than \fIindex1\fR then no characters are deleted. -If \fIindex2\fR is not specified then the single character at \fIindex1\fR is -deleted. It is not allowable to delete characters in a way that would leave -the text without a newline as the last character. The command returns an empty -string. If more indices are given, multiple ranges of text will be deleted. -All indices are first checked for validity before any deletions are made. They -are sorted and the text is removed from the last range to the first range so -deleted text does not cause an undesired index shifting side-effects. If -multiple ranges with the same start index are given, then the longest range is -used. If overlapping ranges are given, then they will be merged into spans -that do not cause deletion of text outside the given ranges due to text -shifted during deletion. +Delete a range of characters from the text. +If both \fIindex1\fR and \fIindex2\fR are specified, then delete +all the characters starting with the one given by \fIindex1\fR +and stopping just before \fIindex2\fR (i.e. the character at +\fIindex2\fR is not deleted). +If \fIindex2\fR does not specify a position later in the text +than \fIindex1\fR then no characters are deleted. +If \fIindex2\fR is not specified then the single character at +\fIindex1\fR is deleted. +Attempts to delete characters in a way that would leave +the text without a newline as the last character will be tweaked by the +text widget to avoid this. In particular, deletion of complete lines of +text up to the end of the text will also delete the newline character just +before the deleted block so that it is replaced by the new final newline +of the text widget. +The command returns an empty string. +If more indices are given, multiple ranges of text will be deleted. +All indices are first checked for validity before any deletions are made. +They are sorted and the text is removed from the last range to the +first range so deleted text does not cause an undesired index shifting +side-effects. If multiple ranges with the same start index are given, +then the longest range is used. If overlapping ranges are given, then +they will be merged into spans that do not cause deletion of text +outside the given ranges due to text shifted during deletion. .TP \fIpathName \fBdlineinfo \fIindex\fR . |