summaryrefslogtreecommitdiffstats
path: root/doc/text.n
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2004-08-17 22:37:23 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2004-08-17 22:37:23 (GMT)
commit3fb4b62b126615f18524357090c3bccf0985fcae (patch)
treee00390b37b5eea519bafc3dbc07a169e0d2bbc6c /doc/text.n
parent21742ef35eb0732a8e33f526626dcf61425d786b (diff)
downloadtk-3fb4b62b126615f18524357090c3bccf0985fcae.zip
tk-3fb4b62b126615f18524357090c3bccf0985fcae.tar.gz
tk-3fb4b62b126615f18524357090c3bccf0985fcae.tar.bz2
Doc patches [1010083] and [1010607] from Mikhail Kolesnitschenko.
Also some general fixes to menu.n and text.n
Diffstat (limited to 'doc/text.n')
-rw-r--r--doc/text.n185
1 files changed, 93 insertions, 92 deletions
diff --git a/doc/text.n b/doc/text.n
index 062254d..a670c14 100644
--- a/doc/text.n
+++ b/doc/text.n
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: text.n,v 1.26 2004/06/04 10:51:17 vincentdarley Exp $
+'\" RCS: @(#) $Id: text.n,v 1.27 2004/08/17 22:37:24 dkf Exp $
'\"
.so man.macros
.TH text n 8.5 Tk "Tk Built-In Commands"
@@ -58,21 +58,21 @@ Requests additional space above each text line in the widget,
using any of the standard forms for screen distances.
If a line wraps, this option only applies to the first line
on the display.
-This option may be overriden with \fB\-spacing1\fR options in
+This option may be overridden with \fB\-spacing1\fR options in
tags.
.OP \-spacing2 spacing2 Spacing2
For lines that wrap (so that they cover more than one line on the
display) this option specifies additional space to provide between
the display lines that represent a single line of text.
The value may have any of the standard forms for screen distances.
-This option may be overriden with \fB\-spacing2\fR options in
+This option may be overridden with \fB\-spacing2\fR options in
tags.
.OP \-spacing3 spacing3 Spacing3
Requests additional space below each text line in the widget,
using any of the standard forms for screen distances.
If a line wraps, this option only applies to the last line
on the display.
-This option may be overriden with \fB\-spacing3\fR options in
+This option may be overridden with \fB\-spacing3\fR options in
tags.
.OP \-state state State
Specifies one of two states for the text: \fBnormal\fR or \fBdisabled\fR.
@@ -156,8 +156,8 @@ that scripts are invoked when particular actions such as keystrokes
and mouse button presses occur in particular ranges of the text.
See TAGS below for more details.
.PP
-The second form of annotation consists of marks, which are floating
-markers in the text.
+The second form of annotation consists of floating markers in the text
+called "marks".
Marks are used to keep track of various interesting positions in the
text as it is edited.
See MARKS below for more details.
@@ -190,15 +190,15 @@ Where \fIbase\fR gives a starting point and the \fImodifier\fRs adjust
the index from the starting point (e.g. move forward or backward one
character). Every index must contain a \fIbase\fR, but the
\fImodifier\fRs are optional. Most modifiers (as documented below) allow
-an optional submodifier. Valid \fIsubmodifier\fRs are nothing, \fIany\fB
-or \fIdisplay\fR. If the submodifier is abbreviated, then it must be
+an optional submodifier. Valid submodifiers are \fBany\fR
+and \fBdisplay\fR. If the submodifier is abbreviated, then it must be
followed by whitespace, but otherwise there need be no space between the
-submodifier and the following \fImodifier\fR. Typically the \fIdisplay\fR
+submodifier and the following \fImodifier\fR. Typically the \fBdisplay\fR
submodifier adjusts the meaning of the following \fImodifier\fR to make
it refer to visual or non-elided units rather than logical units, but
this is explained for each relevant case below. Lastly, where \fIcount\fR
is used as part of a modifier, it can be positive or negative, so '\fIbase\fR
-- -3 lines' is perfectly valid (and equivalent to '\fIbase\fR
+\- \-3 lines' is perfectly valid (and equivalent to '\fIbase\fR
+3lines').
.PP
The \fIbase\fR for an index must have one of the following forms:
@@ -253,54 +253,54 @@ If modifiers follow the base index, each one of them must have one
of the forms listed below. Keywords such as \fBchars\fR and \fBwordend\fR
may be abbreviated as long as the abbreviation is unambiguous.
.TP
-\fB+ \fIcount\fB \fI?submodifier?\fB chars\fR
+\fB+ \fIcount\fR ?\fIsubmodifier\fR? \fBchars\fR
Adjust the index forward by \fIcount\fR characters, moving to later lines
in the text if necessary. If there are fewer than \fIcount\fR characters
in the text after the current index, then set the index to the last index
in the text. Spaces on either side of \fIcount\fR are optional. If the
-\fIdisplay\fR submodifier is given, elided characters are skipped over
-without being counted. If \fIany\fR is given, then all characters are
+\fBdisplay\fR submodifier is given, elided characters are skipped over
+without being counted. If \fBany\fR is given, then all characters are
counted. For historical reasons, if neither modifier is given then the
count actually takes place in units of index positions (see \fBindices\fR
for details). This behaviour may be changed in a future major release,
so if you need an index count, you are encouraged to use \fBindices\fR
instead wherever possible.
.TP
-\fB\- \fIcount\fB \fI?submodifier?\fB chars\fR
+\fB\- \fIcount\fR ?\fIsubmodifier\fR? \fBchars\fR
Adjust the index backward by \fIcount\fR characters, moving to earlier
lines in the text if necessary. If there are fewer than \fIcount\fR
characters in the text before the current index, then set the index to
the first index in the text (1.0). Spaces on either side of \fIcount\fR
-are optional. If the \fIdisplay\fR submodifier is given, elided
-characters are skipped over without being counted. If \fIany\fR is
+are optional. If the \fBdisplay\fR submodifier is given, elided
+characters are skipped over without being counted. If \fBany\fR is
given, then all characters are counted. For historical reasons, if
neither modifier is given then the count actually takes place in units of
index positions (see \fBindices\fR for details). This behaviour may be
changed in a future major release, so if you need an index count, you are
encouraged to use \fBindices\fR instead wherever possible.
.TP
-\fB+ \fIcount\fB \fI?submodifier?\fB indices\fR
+\fB+ \fIcount\fR ?\fIsubmodifier\fR? \fBindices\fR
Adjust the index forward by \fIcount\fR index positions, moving to later
lines in the text if necessary. If there are fewer than \fIcount\fR
index positions in the text after the current index, then set the index
to the last index position in the text. Spaces on either side of
\fIcount\fR are optional. Note that an index position is either a single
character or a single embedded image or embedded window. If the
-\fIdisplay\fR submodifier is given, elided indices are skipped over
-without being counted. If \fIany\fR is given, then all indices are
-counted, which is also the default behaviour if no modifier is given.
+\fBdisplay\fR submodifier is given, elided indices are skipped over
+without being counted. If \fBany\fR is given, then all indices are
+counted; this is also the default behaviour if no modifier is given.
.TP
-\fB\- \fIcount\fB \fI?submodifier?\fB indices\fR
+\fB\- \fIcount\fR ?\fIsubmodifier\fR? \fBindices\fR
Adjust the index backward by \fIcount\fR index positions, moving to
earlier lines in the text if necessary. If there are fewer than
\fIcount\fR index positions in the text before the current index, then
set the index to the first index position (1.0) in the text. Spaces on
-either side of \fIcount\fR are optional. If the \fIdisplay\fR
+either side of \fIcount\fR are optional. If the \fBdisplay\fR
submodifier is given, elided indices are skipped over without being
-counted. If \fIany\fR is given, then all indices are counted, which is
+counted. If \fBany\fR is given, then all indices are counted; this is
also the default behaviour if no modifier is given.
.TP
-\fB+ \fIcount\fB \fI?submodifier?\fB lines\fR
+\fB+ \fIcount\fR ?\fIsubmodifier\fR? \fBlines\fR
Adjust the index forward by \fIcount\fR lines, retaining the same
character position within the line. If there are fewer than \fIcount\fR
lines after the line containing the current index, then set the index to
@@ -308,13 +308,13 @@ refer to the same character position on the last line of the text. Then,
if the line is not long enough to contain a character at the indicated
character position, adjust the character position to refer to the last
character of the line (the newline). Spaces on either side of
-\fIcount\fR are optional. If the \fIdisplay\fR submodifier is given,
+\fIcount\fR are optional. If the \fBdisplay\fR submodifier is given,
then each visual display line is counted separately. Otherwise, if
-\fIany\fR (or no modifier) is given, then each logical line (no matter
+\fBany\fR (or no modifier) is given, then each logical line (no matter
how many times it is visually wrapped) counts just once. If the relevant
lines are not wrapped, then these two methods of counting are equivalent.
.TP
-\fB\- \fIcount\fB \fI?submodifier?\fB lines\fR
+\fB\- \fIcount\fR ?\fIsubmodifier\fR? \fBlines\fR
Adjust the index backward by \fIcount\fR logical lines, retaining the
same character position within the line. If there are fewer than
\fIcount\fR lines before the line containing the current index, then set
@@ -322,34 +322,34 @@ the index to refer to the same character position on the first line of
the text. Then, if the line is not long enough to contain a character at
the indicated character position, adjust the character position to refer
to the last character of the line (the newline). Spaces on either side
-of \fIcount\fR are optional. If the \fIdisplay\fR submodifier is given,
+of \fIcount\fR are optional. If the \fBdisplay\fR submodifier is given,
then each visual display line is counted separately. Otherwise, if
-\fIany\fR (or no modifier) is given, then each logical line (no matter
+\fBany\fR (or no modifier) is given, then each logical line (no matter
how many times it is visually wrapped) counts just once. If the relevant
lines are not wrapped, then these two methods of counting are equivalent.
.TP
-\fB\fI?submodifier?\fB linestart\fR
+?\fIsubmodifier\fR? \fBlinestart\fR
Adjust the index to refer to the first character on the line. If the
-\fIdisplay\fR submodifier is given, this is the first character on the
+\fBdisplay\fR submodifier is given, this is the first character on the
display line, otherwise on the logical line.
.TP
-\fB\fI?submodifier?\fB lineend\fR
+?\fIsubmodifier\fR? \fBlineend\fR
Adjust the index to refer to the last character on the line (the
-newline). If the \fIdisplay\fR submodifier is given, this is the last
+newline). If the \fBdisplay\fR submodifier is given, this is the last
character on the display line, otherwise on the logical line.
.TP
-\fB\fI?submodifier?\fB wordstart\fR
+?\fIsubmodifier\fR? \fBwordstart\fR
Adjust the index to refer to the first character of the word containing
the current index. A word consists of any number of adjacent characters
that are letters, digits, or underscores, or a single character that is
-not one of these. If the \fIdisplay\fR submodifier is given, this only
+not one of these. If the \fBdisplay\fR submodifier is given, this only
examines non-elided characters, otherwise all characters (elided or not)
are examined.
.TP
-\fB\fI?submodifier?\fB wordend\fR
+?\fIsubmodifier\fR? \fBwordend\fR
Adjust the index to refer to the character just after the last one of the
word containing the current index. If the current index refers to the
-last character of the text then it is not modified. If the \fIdisplay\fR
+last character of the text then it is not modified. If the \fBdisplay\fR
submodifier is given, this only examines non-elided characters, otherwise
all characters (elided or not) are examined.
.PP
@@ -360,7 +360,8 @@ refers to the next-to-last character in the text and
the first one in the word containing the insertion cursor.
.PP
Where modifiers result in index changes by display lines, display chars
-or display indices and the \fIbase\fP refers to an index which is elided,
+or display indices, and the \fIbase\fP refers to an index inside an
+elided tag,
that base index is considered to be equivalent to the first following
non-elided index.
.SH TAGS
@@ -369,7 +370,7 @@ The first form of annotation in text widgets is a tag.
A tag is a textual string that is associated with some of the characters
in a text.
Tags may contain arbitrary characters, but it is probably best to
-avoid using the the characters `` '' (space), \fB+\fR, or \fB\-\fR:
+avoid using the characters `` '' (space), \fB+\fR, or \fB\-\fR:
these characters have special meaning in indices, so tags containing
them can't be used as indices.
There may be any number of tags associated with characters in a
@@ -594,7 +595,7 @@ Marks may be manipulated with the ``\fIpathName \fBmark\fR'' widget
command, and their current locations may be determined by using the
mark name as an index in widget commands.
.PP
-Each mark also has a \fIgravity\fR, which is either \fBleft\fR or
+Each mark also has a "gravity", which is either \fBleft\fR or
\fBright\fR.
The gravity for a mark specifies what happens to the mark when
text is inserted at the point of the mark.
@@ -703,21 +704,21 @@ text is modified or scrolled.
Each embedded image occupies one unit's worth of index space
in the text widget, and it may be referred to either by
its position in the widget's index space, or the name it is assigned
-when the image is inserted into the text widget widh \fBimage create\fP.
+when the image is inserted into the text widget with \fBimage create\fP.
If the range of text containing the embedded image is deleted then
that copy of the image is removed from the screen.
.PP
When an embedded image is added to a text widget with the \fBimage
create\fR widget command, a name unique to this instance of the image
is returned. This name may then be used to refer to this image
-instance. The name is taken to be the value of the \fB-name\fP option
-(described below). If the \fB-name\fP option is not provided, the
-\fB-image\fP name is used instead. If the \fIimageName\fP is already
+instance. The name is taken to be the value of the \fB\-name\fP option
+(described below). If the \fB\-name\fP option is not provided, the
+\fB\-image\fP name is used instead. If the \fIimageName\fP is already
in use in the text widget, then \fB#\fInn\fR is added to the end of the
\fIimageName\fP, where \fInn\fP is an arbitrary integer. This insures
the \fIimageName\fP is unique.
Once this name is assigned to this instance of the image, it does not
-change, even though the \fB-image\fP or \fB-name\fP values can be changed
+change, even though the \fB\-image\fP or \fB\-name\fP values can be changed
with \fBimage configure\fP.
.PP
When an embedded image is added to a text widget with the
@@ -800,7 +801,7 @@ this point whenever the text widget has the input focus.
.SH "THE MODIFIED FLAG"
The text widget can keep track of changes to the content of the widget
by means of the modified flag. Inserting or deleting text will set
-this flag. The flag can be queried, set and cleared programatically
+this flag. The flag can be queried, set and cleared programmatically
as well. Whenever the flag changes state a \fB<<Modified>>\fR virtual
event is generated. See the \fBedit modified\fR widget command for
more details.
@@ -809,7 +810,7 @@ more details.
.PP
.VS 8.4
The text widget has an unlimited undo and redo mechanism (when the
-\fB-undo\fR widget option is true) which records every insert and
+\fB\-undo\fR widget option is true) which records every insert and
delete action on a stack.
.PP
Boundaries (called "separators") are inserted between edit actions. The
@@ -820,8 +821,8 @@ redo stack, so that an undone edit can be redone again. The redo stack
is cleared whenever new edit actions are recorded on the undo stack. The
undo and redo stacks can be cleared to keep their depth under control.
.PP
-Separators are inserted automatically when the \fB-autoseparators\fR
-widget option is true. You can insert separators programatically as
+Separators are inserted automatically when the \fB\-autoseparators\fR
+widget option is true. You can insert separators programmatically as
well. If a separator is already present at the top of the undo stack
no other will be inserted. That means that two separators on the undo
stack are always separated by at least one insert or delete action.
@@ -900,60 +901,60 @@ If \fIindex1\fR is after \fIindex2\fR, the result will be a negative number
(and this holds for each of the possible options).
The actual items which are counted depend on the
options given. The result is a list of integers, one for the result of
-each counting option given. Valid counting options are \fI-chars\fR,
-\fI-displaychars\fR, \fI-displayindices\fR, \fI-displaylines\fR,
-\fI-indices\fR, \fI-lines\fR, \fI-xpixels\fR and \fI-ypixels\fR. The
-default value, if no option is specified, is \fI-indices\fR. There is an
-additional possible option \fI-update\fR which is a modifier. If given,
+each counting option given. Valid counting options are \fB\-chars\fR,
+\fB\-displaychars\fR, \fB\-displayindices\fR, \fB\-displaylines\fR,
+\fB\-indices\fR, \fB\-lines\fR, \fB\-xpixels\fR and \fB\-ypixels\fR. The
+default value, if no option is specified, is \fB\-indices\fR. There is an
+additional possible option \fB\-update\fR which is a modifier. If given,
then all subsequent options ensure that any possible out of date
information is recalculated. This currently only has any effect for the
-\fI-ypixels\fR count (which, if 'update' is not given, will use the text
+\fI\-ypixels\fR count (which, if \fB\-update\fR is not given, will use the text
widget's current cached value for each line). The count options are
interpreted as follows:
.RS
-.IP \fI-chars\fR
+.IP \fB\-chars\fR
count all characters, whether elided or not. Do not count
embedded windows or images.
-.IP \fI-displaychars\fR
+.IP \fB\-displaychars\fR
count all non-elided characters.
-.IP \fI-displayindices\fR
+.IP \fB\-displayindices\fR
count all non-elided characters, windows and images.
-.IP \fI-displaylines\fR
+.IP \fB\-displaylines\fR
count all display lines (i.e. counting one for each
time a line wraps) from the line of the first index up to, but not
including the display line of the second index. Therefore if they are
both on the same display line, zero will be returned. By definition
displaylines are visible and therefore this only counts portions of
actual visible lines.
-.IP \fI-indices\fR
+.IP \fB\-indices\fR
count all characters and embedded windows or images (i.e.
everything which counts in text-widget index space), whether they are
elided or not.
-.IP \fI-lines\fR
+.IP \fB\-lines\fR
count all logical lines (irrespective of wrapping) from
the line of the first index up to, but not including the line of the
second index. Therefore if they are both on the same line, zero will be
returned. Logical lines are counted whether they are currently visible
(non-elided) or not.
-.IP \fI-xpixels\fR
+.IP \fB\-xpixels\fR
count the number of horizontal pixels from the first
pixel of the first index to (but not including) the first pixel of the
second index. To count the total desired width of the text widget
(assuming wrapping is not enabled), first find the longest line and then
-use '.text count -xpixels "${line}.0" "${line}.0 lineend"'.
-.IP \fI-ypixels\fR
+use '.text count \-xpixels "${line}.0" "${line}.0 lineend"'.
+.IP \fB\-ypixels\fR
count the number of vertical pixels from the first pixel
of the first index to (but not including) the first pixel of the second
index. If both indices are on the same display line, zero will be
returned. To count the total number of vertical pixels in the text
-widget, use '.text count -ypixels 1.0 end', and to ensure this is up to
-date, use '.text count -update -ypixels 1.0 end'.
+widget, use '.text count \-ypixels 1.0 end', and to ensure this is up to
+date, use '.text count \-update \-ypixels 1.0 end'.
.PP
The command returns a positive or negative integer corresponding to the
number of items counted between the two indices. One such integer is
returned for each counting option given, so a list is returned if more
-than one option was supplied. For example '.text count -xpixels
--ypixels 1.3 4.5' is perfectly valid and will return a list of two
+than one option was supplied. For example '.text count \-xpixels
+\-ypixels 1.3 4.5' is perfectly valid and will return a list of two
elements.
.RE
.VE 8.5
@@ -997,7 +998,7 @@ 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 to deleted text does not cause a undesired index shifting
+first range to 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
@@ -1069,7 +1070,7 @@ Include information about text in the dump results. The value is the
text up to the next element or the end of range indicated by \fIindex2\fR.
A text element does not span newlines. A multi-line block of text that
contains no marks or tag transitions will still be dumped as a set
-of text seqments that each end with a newline. The newline is part
+of text segments that each end with a newline. The newline is part
of the value.
.TP
\fB\-window\fR
@@ -1095,9 +1096,9 @@ user can set or clear the modified flag. If \fIboolean\fR is
specified, sets the modified flag of the widget to \fIboolean\fR.
.TP
\fIpathName \fBedit redo\fR
-When the \fB-undo\fR option is true, reapplies the last undone edits
+When the \fB\-undo\fR option is true, reapplies the last undone edits
provided no other edits were done since then. Generates an error when
-the redo stack is empty. Does nothing when the \fB-undo\fR option is
+the redo stack is empty. Does nothing when the \fB\-undo\fR option is
false.
.TP
\fIpathName \fBedit reset\fR
@@ -1105,18 +1106,18 @@ Clears the undo and redo stacks.
.TP
\fIpathName \fBedit separator\fR
Inserts a separator (boundary) on the undo stack. Does nothing when
-the \fB-undo\fR option is false.
+the \fB\-undo\fR option is false.
.TP
\fIpathName \fBedit undo\fR
-Undoes the last edit action when the \fB-undo\fR option is true. An
+Undoes the last edit action when the \fB\-undo\fR option is true. An
edit action is defined as all the insert and delete commands that are
recorded on the undo stack in between two separators. Generates an
-error when the undo stack is empty. Does nothing when the \fB-undo\fR
+error when the undo stack is empty. Does nothing when the \fB\-undo\fR
option is false.
.RE
.VE 8.4
.TP
-\fIpathName \fBget\fR \fI?-displaychars?\fR \fI-- index1\fR ?\fIindex2 ...\fR?
+\fIpathName \fBget\fR \fI?\-displaychars?\fR \fI\-\- index1\fR ?\fIindex2 ...\fR?
Return a range of characters from the text.
The return value will be all the characters in the text starting
with the one whose index is \fIindex1\fR and ending just before
@@ -1135,7 +1136,7 @@ in a list. Invalid ranges will not be represented with empty strings in
the list. The ranges are returned in the order passed to \fBget\fR.
.VE 8.4
.VS 8.5
-If the \fI-displaychars\fR option is given, then, within each range,
+If the \fB\-displaychars\fR option is given, then, within each range,
only those characters which are not elided will be returned. This may
have the effect that some of the returned ranges are empty strings.
.VE 8.5
@@ -1346,7 +1347,7 @@ This allows \fI.\fR and \fI[^\fR sequences to match the newline
character \fI\en\fR, which they will otherwise not do (see the \fBregexp\fR
command for details). This option is only meaningful if \fB\-regexp\fR
is also given, and an error will be thrown otherwise. For example,
-to match the entire text, use 'search -nolinestop -regexp ".*" 1.0'.
+to match the entire text, use 'search \-nolinestop \-regexp ".*" 1.0'.
.TP
\fB\-nocase\fR
Ignore case differences between the pattern and the text.
@@ -1367,10 +1368,10 @@ given, then \fBvarName\fR is also set to a list containing one element
for each successful match. Note that, even for exact searches, the
elements of this list may be different, if there are embedded images,
windows or hidden text. Searches with \fB\-all\fR behave very
-similarly to the Tcl command \fBregexp -all\fR, in that overlapping
+similarly to the Tcl command \fBregexp \-all\fR, in that overlapping
matches are not normally returned. For example, applying an \fB\-all\fR search
of the pattern '\\w+' against 'hello there' will just match twice, once
-for each word, and matching 'Z[a-z]+Z' against 'ZooZooZoo' will just
+for each word, and matching 'Z[a\-z]+Z' against 'ZooZooZoo' will just
match once.
.TP
\fB\-overlap\fR
@@ -1380,11 +1381,11 @@ switch changes that behaviour so that all matches which are not totally
enclosed within another match are returned. For example, applying an
\fB\-overlap\fR search of the pattern '\\w+' against 'hello there' will
just match twice (i.e. no different to just \fB\-all\fR),
-but matching 'Z[a-z]+Z' against 'ZooZooZoo' will now match twice.
+but matching 'Z[a\-z]+Z' against 'ZooZooZoo' will now match twice.
An error will be thrown if this switch is used without \fB\-all\fR.
.TP
\fB\-elide\fR
-Find elidden (hidden) text as well. By default only displayed text is
+Find elided (hidden) text as well. By default only displayed text is
searched.
.TP
\fB\-\|\-\fR
@@ -1933,11 +1934,11 @@ the insertion cursor.
.IP [32]
.VS 8.4
Control-z (and Control-underscore on UNIX when \fBtk_strictMotif\fR is
-true) undoes the last edit action if the \fB-undo\fR option is true.
+true) undoes the last edit action if the \fB\-undo\fR option is true.
Does nothing otherwise.
.IP [33]
Control-Z (or Control-y on Windows) reapplies the last undone edit
-action if the \fB-undo\fR option is true. Does nothing otherwise.
+action if the \fB\-undo\fR option is true. Does nothing otherwise.
.VE 8.4
.PP
If the widget is disabled using the \fB\-state\fR option, then its
@@ -1954,8 +1955,8 @@ Before Tk 8.5, the widget used the string "chars" to refer to index
positions (which included characters, embedded windows and embedded
images). As of Tk 8.5 the text widget deals separately and correctly
with "chars" and "indices". For backwards compatibility, however, the
-index modifiers "+N chars" and "-N chars" continue to refer to indices.
-One must use any of the full forms "+N any chars" or "-N any chars" etc
+index modifiers "+N chars" and "\-N chars" continue to refer to indices.
+One must use any of the full forms "+N any chars" or "\-N any chars" etc
to refer to actual character indices. This confusion may be fixed in a
future release by making the widget correctly interpret "+N chars" as a
synonym for "+N any chars".
@@ -1996,7 +1997,7 @@ Set the \fBinsertOffTime\fP attribute to 0 avoid this.
.SH "KNOWN BUGS"
.PP
-The \fB-elide\fP tag attribute, introduced in Tk 8.3, has one known
+The \fB\-elide\fP tag attribute, introduced in Tk 8.3, has one known
limitation. Newlines which have this attribute are only actually elided
if their entire logical line is also elided. Where there is a logical
line which begins un-elided but terminates with an elided newline, that
@@ -2007,9 +2008,9 @@ logical lines. This does mean, however, that logical lines which are
completely elided have no problems.
.VS 8.5
.PP
-The \fBsearch -regexp\fR sub-command attempts to perform sophisticated
+The \fBsearch \-regexp\fR sub-command attempts to perform sophisticated
regexp matching across multiple lines in an efficient fashion (since Tk
-8.5), examing each line individually, and then in small groups of lines,
+8.5), examining each line individually, and then in small groups of lines,
whether searching forwards or backwards. Under certain conditions the
search result might differ from that obtained by applying the same regexp
to the entire text from the widget in one go. For example, when
@@ -2026,7 +2027,7 @@ a rare problem, but it can occur, for example:
.CS
pack [text .t]
.t insert 1.0 "aaaa\\nbbbb\\ncccc\\nbbbb\\naaaa\\n"
- .t search -regexp -- {(a+|b+\\nc+\\nb+)+\\na+} 1.0
+ .t search \-regexp \-\- {(a+|b+\\nc+\\nb+)+\\na+} 1.0
.CE
will not find a match when one exists of 19
characters starting from the first 'b'.
@@ -2043,10 +2044,10 @@ For example:
.CS
pack [text .t]
.t insert 1.0 "aaaa\\nbbbb\\nbbbb\\nbbbb\\nbbbb\\n"
- .t search -regexp -backward -- {b+\\n|a+\\n(b+\\n)+} end
+ .t search \-regexp \-backward \-\- {b+\\n|a+\\n(b+\\n)+} end
.CE
matches at '5.0' when a true greedy match would match at '1.0'.
-Similarly if we add \fB-all\fR to this case, it matches at
+Similarly if we add \fB\-all\fR to this case, it matches at
all of '5.0', '4.0', '3.0' and '1.0',
when really it should only match at '1.0' since that match
encloses all the others.