Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
pageup and pagedown keys don't work #8
Confirmed in Cygwin as well. However, in Cygwin, the scroll wheel acts like up/down arrow, which is kind of cool. My Mac's Bluetooth keyboard doesn't have PgUp/PgDn keys. I suspect it has to do with Tines inheriting hnb's hard-coded assumption that it's living in a Latin-1 environment while the rest of the world has moved on to UTF-8. Making Tines UTF-8 friendly is a long-term fix I have planned, and the fix for this particular issue should come along for the ride.
Try these two things to verify:
As a workaround, you could bind a control or option key to
Keygrab shows  [S] for PgUp and  [R] for PgDown. 338 and 339 are the correct values.
If you hit PgUp or PgDown while editing an entry it says.
No action assigned to 'npage'(338d) in nodeedit-mode
Which means its reading it right.
So the problem seems to be in the non-nodeedit-mode. Probably the actual npage and ppage functions are borked.
Changing the LANG environment variable to the ones you suggested have no effect.
I think I found the problem.
In evilloop.c, starting at line 205, is the code that handles pagedown & pageup. It moves the number of lines specified by the integer variables
I can fix that by setting them to (LINES-2), reading the height from curses. I might not be able to get to it tonight, but I should be able to tomorrow. I kind of think hnb never had that working, it's not code I've messed with much other than changing a couple variable names.
Try this patch. It goes to the top or bottom of the current level you're in, which might be useful if you've done "Expand All."
Give it a try and see if it works for you. BTW, my Mac keyboard seems to recognize Fn+up/down as PageUp/PageDown.
I did notice that tines_nodes_up and tines_nodes_down are still named hnb_nodes in ui_draw. I changed all the instances as I figured the value wasn't being passed, but no go.
EDIT: Yep, something is definitely funked up. If you arrow down 1 past the last entry, it collapses the node. That's not how it used to work. It used to just stop.