Command line prompt does not refresh after window set(..., 'prompt', ... )

Submitted by: Karl Johan Kleist Last Updated: 2006-09-20

=Problem=

A feature in Arbortext Publisher 5.1 (and it remains in 5.2 M030) prevents the command line prompt from being properly refreshed after having been modified by the function window_set.

=Solution= Tung Fu described a workaround. The following code is inspired by his recipe:

window_set(winId, 'prompt', 'An even better prompt'); window_set(winId, 'canvasforeground', window_get(winId, 'canvasforeground'); local oldActiveWindow = current_window(window_id('cmd')); redisplay; current_window(oldActiveWindow); # restore active window Finally, I quote Tung Fu: "The behavior probably still will not be 100% correct, but it should be better than no workaround."
 * 1) winId is the id of the edit window
 * 1) prompt will not refresh
 * 1) workaround
 * 1) set new active window, remember old one
 * 1) workaround