Skip to content

Avoid using cursor for item selection from user #51

@dasupradyumna

Description

@dasupradyumna

Problem

All plugin floats (except the task buffer) have navigation keymaps defined based on the movement of the cursor. Internal plugin logic works by computing an index from the cursor position in the UI window. This is not very maintainable as the structure of the UI content changes, since it would require updating this calculation by changing the line offset or making it configurable.

Proposal

Maintain a selection index (or current line) as a buffer-local variable, instead of implicitly using the cursor position. Update this variable with the navigation keymaps, and access this in the plugin logic internally.
The cursor would still be visible on the screen in some terminals even if it is not being used by the plugin or made invisible in neovim using Cursor* highlight groups. This can be probably be fixed using a dummy window with focus behind the launcher window which the user sees and "interacts" with.

This will also allow the plugin to setup custom highlighting for the current selection in select-mode or current field in edit-mode, rather than depending on cursorline for highlights. Details in #52

Metadata

Metadata

Assignees

Labels

internalRelated to internal project development

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions