nano-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Nano-devel] [RFC] vertical scroll arrows


From: Brand Huntsman
Subject: [Nano-devel] [RFC] vertical scroll arrows
Date: Sun, 11 Mar 2018 01:17:58 -0700

Would anyone be interested in arrows to indicate which direction the buffer can 
be scrolled? It would help when looking at a buffer that has been scrolled off 
the top of the screen.

The attached hack displays two arrows on the far right side of statusbar. The 
code in winio.c:scrollbar() can easily be modified to place them on left or 
right side of titlebar or statusbar. The right side of statusbar is probably 
the best location, they would blend in with the help bar keys if on the left 
side of statusbar when using default colors. If placed in the titlebar, the 
version/buffer-indicator or view/modified status would need to be shifted 
inward a cell or two, to avoid touching the arrows.

If used in the statusbar, it should probably not draw anything if the buffer 
can't be scrolled. If used in the titlebar it should probably always reserve 
the two empty cells to prevent shifting. But that might annoy some people. 
Right side of titlebar would be better since it is often empty and the 
unbalanced indent would be less noticeable.

I also tried splitting the arrows so up arrow was on left and down arrow was on 
right side of screen. It wasn't too bad in a narrow terminal but was almost 
worthless in a wide terminal.

I'm not sure the best locations to update the arrows from but the current call 
sites handle every case I could think of. Anyone know the best locations to do 
it?

The patch has no handling for a wide statusbar, it just overwrites the first or 
last two cells, same with titlebar. That would need to be handled properly. It 
also doesn't provide any fallback characters for non-utf8 terminals, any 
suggestions?

Attachment: add-vertical-scroll-arrows.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]