Skip to content

cursor and cursorline break vim.fn.input #24

@HendrikSP

Description

@HendrikSP

A multiline prompt is cut off at the start when this plugin is active.

Tested with

NVIM v0.11.3
Build type: Release
LuaJIT 2.1.1753364724

and init.lua:

local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
	local lazyrepo = "https://github.com/folke/lazy.nvim.git"
	local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
	if vim.v.shell_error ~= 0 then
		vim.api.nvim_echo({
			{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
			{ out, "WarningMsg" },
			{ "\nPress any key to exit..." },
		}, true, {})
		vim.fn.getchar()
		os.exit(1)
	end
end
vim.opt.rtp:prepend(lazypath)

require("lazy").setup({
	spec = {
		{
			"rasulomaroff/reactive.nvim",
			opts = { builtin = {
				cursorline = true,
				cursor = true,
				modemsg = true,
			} },
		},
	},
})

vim.keymap.set("n", "t", function()
	vim.fn.input("This line is hidden\nAnd this line as well.\nYou see only me (but black on black, start typing to see at least me)")
end)

disabling recative will show the whole prompt, when t is pressed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions