Smart Returns Don't Work Properly in WordPerfect 8 or 9

From HotDocs Wiki

Jump to: navigation, search

Problem

When the option to have HotDocs insert returns after instructions in text template is set to Smart, WordPerfect 8 and WordPerfect 9 seem to ignore this option.

Solution

There is a difference between the way WordPerfect 8 and 9 work versus later version regarding cursor movement. Given the following WordPerfect text and codes, where [] represents the cursor position:

[HRt]
[Bookmark][]abc

In WordPerfect 10 and above, pressing left arrow and then right arrow (with Reveal Codes turned off) yields:

[HRt]
[][Bookmark] abc

(i.e. the cursor position is before the bookmark), whereas pressing the same keys in WordPerfect 8 or 9 yields:

[HRt]
[Bookmark][]abc

This difference causes problems in the code where HotDocs determines whether the cursor is immediately following a hard return, the consequence being that the smart return capacity does not work correctly in WordPerfect 8 and 9. Users of these versions should either leave HotDocs Options > Template Development > Insert returns after instructions in text templates set to Always, or they should upgrade to a newer version of WordPerfect.