Product Documentation
Cadence User Interface SKILL Reference
Product Version IC23.1, September 2023

hiGoToIndex

hiGoToIndex(
w_windowId
x_indexNo
?highlight g_highlight
?align g_align
?forceAlign g_forceAlign
)
=> t / nil

Description

Positions the specified character index within the viewport for a given text window

Arguments

w_windowId

Specifies the ID of the text window

x_indexNo

Specifies the desired index of the character that you want to highlight. The index number starts at 0.

?highlight g_highlight

  

Highlights the index with a green background to help you locate the desired index number.

In any selection, the highlight gets disappear when the left mouse is clicked in the text window.

The default value is t.

?align g_align

Indicates where the highlighted text / character should be positioned with respect to the window of the text editor, that is at the top, in the middle, or at the bottom of the window.

If the desired index already in the visible area of the window, the viewport does not get adjusted unless ?forceAlign is set to t.

Valid values are 'top, 'center or 'bottom.

?forceAlign g_forceAlign

  

Adjusts the visible region to respect the value for ?align, even if the requested index was already visible.

The ?forceAlign parameter is most likely to be useful while working on code, especially, where you want to alter what is displayed in the viewport. For example, positioning the required line at the top of a verilog block, rather than just ensuring that the line is somewhere on the page.

Values Returned

t

The line number is valid and gets displayed.

nil

The line number is invalid.

Examples

win=(view "myFile.txt");; Opens a text window
hiGoToIndex(win 0 ?highlight t);; Highlights first character
hiGoToIndex(win 1000 ?highlight t ?align 'center ?forceAlign t);; Highlights character 1000, and position it centrally in text window

Related Topics

Functions of Viewfile Window


Return to top
 ⠀
X