Fix for bug where KateCompletionWidget::bottom() doesn't work if we have tried a cursorUp() while at the top of the completion list.
Review Request #109647 - Created March 21, 2013 and submitted
|Simon St James|
More of a request for help than a real patch - I'm outside of my area of expertise, here ;) I stumbled upon this bug while working on the Kate Vim mode completion integration: if KateCompletionWidget::cursorUp() is called while at the top of the list of completions, then the next call to KateCompletionWidget::bottom() will fail; see the test in this attached patch. I made this pass by modifying cursorUp to look more like cursorDown, but it feels like a bit of a hack to me as we are now ignoring the result of a method call. Any ideas for a proper fix, and a way to make the test a little better (see the "TODO")? Cheers!
Automated test added; some manual testing.
Review request changed
Actually, this might be a saner way to do it: revert my previous effort, and note that m_inCompletionList should not be changed indiscriminately.
Revision 2 (+18 -3)