Call the existing inputable instead of defining how to get the cursorIndex twice.
Use all available inputables to reduce code duplication.
Merge pull request #153 from robru/cleanup_cursor_index

Reduce code duplication by calling inputables from session.js