martanne / vis

A vi-like editor based on Plan 9's structural regular expressions
Other
4.23k stars 256 forks source link

vis: add a ScrollType for window scrolling and remove default case #892

Closed erf closed 3 years ago

erf commented 3 years ago

This makes the window scrolling a bit more explicit and clearer to read.

The default case is not used (as far as i can see) and can therefor be removed. view_scroll_up and view_scroll_down can still be used for arbitrary scrolling.

martanne commented 3 years ago

I don't think it is more readable and as the faulting tests indicate, it changes the behavior/introduces bugs. (The default case is used through selections_navigate).

erf commented 3 years ago

I can only see selections_navigate passing the PAGE_HALF argument which passed that on directly to wscroll, so that should not trigger the default case, but I'm probably missing something here..