API: nvim_get_mode(): return command-line type #16891
Labels
api
libnvim, Nvim RPC API
enhancement
feature request
needs:discussion
For PRs that propose significant changes to some part of the architecture or API
Feature already in Vim?
N/A (Nvim API)
Feature description
Sometimes
nvim_get_mode()
doesn't return enough information to indicate the current mode, especially when in command-line mode (ref vim/vim#6127, #11846), wheremode
returned bynvim_get_mode()
sometimes doesn't start withc
. A solution to this I can think of is to also return command-line type (getcmdtype()
) fromnvim_get_mode()
. This will enable one to correctly tell whether the current mode is command-line mode from a fast API. However, introducing a new key tonvim_get_mode()
will require modifying a lot of functional tests.The text was updated successfully, but these errors were encountered: