The automatic adjustment of the virtual window's location in the memory screen occurs only when an output function is called. If you simply change the virtual cursor location without a subsequent call to an output function, the virtual window's location in the memory screen does not change. If you want the virtual window to be adjusted so the virtual cursor is within its boundaries, you can call the window adjust in memory screen function, wn_adj():
|
This function moves the window so that the virtual cursor is within the window's boundaries. The window moves as little as possible over the memory screen to get the virtual cursor within the window; however, the window will move at least the number of rows and columns specified for the horizontal and vertical scrolling quantities for the window.