Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

normal mode "r" not indicated by ModeChanged, mode() #29449

Open
aidancz opened this issue Jun 22, 2024 · 1 comment
Open

normal mode "r" not indicated by ModeChanged, mode() #29449

aidancz opened this issue Jun 22, 2024 · 1 comment
Labels
enhancement feature request needs:vim-patch upstream issue that must be fixed in Vim first
Milestone

Comments

@aidancz
Copy link

aidancz commented Jun 22, 2024

Problem

pressing r in normal mode, mode(1) returns n

Steps to reproduce

timer.lua

vim.opt.showmode = false

local timer = vim.uv.new_timer()
timer:start(0, 100, vim.schedule_wrap(function()
	vim.cmd('echo mode(1)')
	end))

test

abc

nvim --clean -u timer.lua test, and press r, the message is still n.

"ModeChanged" autocmd won't work in this situation.

Expected behavior

mode(1) give different string than n

Neovim version (nvim -v)

NVIM v0.10.0

Vim (not Nvim) behaves the same?

not sure

Operating system/version

6.9.5-arch1-1

Terminal name/version

st 0.8.5

$TERM environment variable

st-256color

Installation

AUR

@aidancz aidancz added the bug issues reporting wrong behavior label Jun 22, 2024
@zeertzjq zeertzjq added enhancement feature request and removed bug issues reporting wrong behavior labels Jun 22, 2024
@justinmk justinmk added the needs:vim-patch upstream issue that must be fixed in Vim first label Jun 24, 2024
@justinmk justinmk added this to the unplanned milestone Jun 24, 2024
@justinmk justinmk changed the title normal mode r and function mode() normal mode "r" not indicated by ModeChanged, mode() Jun 24, 2024
@matveyt
Copy link
Contributor

matveyt commented Jun 27, 2024

rx is a "two letter" command, like, say, gg. It is not a "mode switcher". Of course, Vim developers might introduce such a (potentially breaking) change but, for now, this behaviour is "as expected".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement feature request needs:vim-patch upstream issue that must be fixed in Vim first
Projects
None yet
Development

No branches or pull requests

4 participants