Word Selection and Line Breaks
Word Selection and Line Breaks
Because TextEdit depends on the Script Manager's FindWord procedure,
TextEdit's definition of a word has been extended. Prior to this version,
TextEdit used its own FindWord procedure to determine word selection and
line breaks. It now relies on the Script Manager's FindWord procedure for
word selection on all systems and also relies on the Script Manager's
FindWord and StyledLineBreak routines for line breaking on systems
with more than one script system installed.
The way TextEdit uses FindWord to calculate word breaks has a significant
impact on word selection. For example, on a Roman-only system that is
localized for the United States, parentheses and other punctuation marks are
no longer included as part of a word selection. However, this behavior may
vary on other localized versions of a Roman system due to the localizability of
the Script Manager's FindWord procedure. Furthermore, when a user
double-clicks a series of spaces, that series of spaces is selected as a word.
(Prior to this version of TextEdit, single spaces were selected as a word.)
This figure illustrates how double-clicking the word Apple selects only the
word Apple, and not the enclosing parentheses. In the figure, the arrows point
to the word breaks.
Word breaks for word selection
For backward compatibility, system software with only the Roman Script
System installed still breaks lines at spaces. On systems with another script
system installed, TextEdit calls the Script Manager's FindWord and
StyledLineBreak routines for line breaking. Lines then break correctly
when a hyphenated word is at the end of a line, as shown in the following figure.
This change is noticeable if you compare a line break on a computer using
system software with only the Roman Script System installed to the same line
on a computer with more than one script system installed.
A line break with multiple scripts installed