trotzig/diffux — pull request #96 by flarnie (2014-04-06 20:52:17+00:00)
Title: Fix bug with j shortcut

The refactored `move_focus` method first adds focus to the top item if there was none, and then makes the movement called for by the parameter. That caused a bug where the 'forward' shortcut when pressed on a fresh page would jump to the second focusable item. This commit adds a condition in the `move_focus` method for when the page is fresh and the movement is forward, stopping it from moving forward the first time the user presses `j`.

For the future, this file could probably be further refactored.