Commit graph

10 commits

Author SHA1 Message Date
Harry Jeffery 764f2d30a4 Make the navigator interface opaque 2017-11-24 17:19:22 +00:00
Harry Jeffery f085f13f42 Refactor navigator poll rate limiting 2017-04-14 22:34:36 +01:00
Harry Jeffery 4fde6ea289 Refactor navigator to new style 2017-04-14 17:10:23 +01:00
Dmitrij D. Czarkoff 0e1d18a2d0 Make imv_navigator_add() return an integer value
In case of error return non-zero value instead of cleaning up navigator.  This
way main loop may do some more cleanup, or maybe even act differently.
2016-05-01 14:40:54 +02:00
Dmitrij D. Czarkoff fe10d9d38f Reimplement '-x' flag
This change effectively backs out f1737ddd06,
implementing the same functionality in a simpler and more correct way.

Implementation details:

 * imv_navigator.wrapped - a new field that has value "0" by default; once
   navigator wraps around the list, this field recieves value "1".
 * imv_navigator_wrapped(&nav) - a new function that returns non-zero value iff
   navigator wrapped around the list.  Currently just returns value of
   imv_navigator.wrapped.

While at it, expanded "test_navigator_remove" and merged it with
"test_navigator_add".  Resulting test is called "test_navigator_add_remove".

Fixes #94.
2016-04-26 22:07:02 +02:00
Dmitrij D. Czarkoff 42fe047e73 Testcase for removal from navigator
Test that removing items leads to predictable results.  Right now test is fairly
incomplete, because it does not cover moving in reversed direction.
2016-04-26 19:27:18 +02:00
Dmitrij D. Czarkoff 98ca878b7e Add vim modelines 2016-04-26 14:19:59 +02:00
Dmitrij D. Czarkoff 83e7ad5222 Add test for file change detection 2016-01-06 02:52:06 +01:00
Dmitrij D. Czarkoff 16cccb11b1 Fix navigator_add test
It was not fixed after imv_navigator_poll_changed() function was changed.
2016-01-06 02:52:06 +01:00
Harry Jeffery c8f4c755c3 Add testing infrastructure 2015-12-08 16:39:31 +00:00