Method: CDK::SCROLL#fixCursorPosition

Defined in:
lib/cdk/components/scroll.rb

#fixCursorPositionObject

Put the cursor on the currently-selected item’s row.



147
148
149
150
151
152
153
154
# File 'lib/cdk/components/scroll.rb', line 147

def fixCursorPosition
  scrollbar_adj = if @scrollbar_placement == LEFT then 1 else 0 end
  ypos = self.SCREEN_YPOS(@current_item - @current_top)
  xpos = self.SCREEN_XPOS(0) + scrollbar_adj

  @input_window.wmove(ypos, xpos)
  wrefresh(@input_window)
end