aboutsummaryrefslogtreecommitdiff
path: root/selection.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-01-05 14:16:40 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-01-05 14:16:40 +0000
commit5a895202740963971423ee27d5c0f77a4a3f84cc (patch)
tree71ac2a9a3d12882bfd8196d44643c56990ab59bd /selection.c
parentREADME: add 'git submodule update --init' step to how-to-install (diff)
render: ensure cursor is always visible in the search box
Maintain a view 'offset' (which glyph from the search string to start rendering at). This defines the start of the viewable area. The end is the offset + the search box size (which is limited to the window size). Adjust this offset whenever the cursor moves outside the viewable area. For now, this is always done in the same way: set the offset to the cursor position. This means that when we're entering text at the end of the search criteria (i.e. the normal case; we're simply typing), and the search box reaches the window size, the cursor will jump to the start of the search box, which will be empty. This could be confusing, but let's go with for now.
Diffstat (limited to 'selection.c')
0 files changed, 0 insertions, 0 deletions