#11320
Yutaka Emura
Keymaster

Here is the code:

menu = CreatePopupMenu();
document.selection.StartOfDocument();

while( document.selection.NextBookmark() ) {
n = document.selection.GetActivePointY( eePosLogical );
s = "Line " + n;
menu.Add( s, n );
}
result = menu.Track( 0 );
if( result > 0 ) {
document.selection.SetActivePoint( eePosLogical, 1, result );
}