-
-
Notifications
You must be signed in to change notification settings - Fork 9
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
[Bug] Text input made readonly #46
Comments
Another issue: If I remove It looks like just exiting insert mode makes the input readonly. |
Removing autoresize seems to be a workaround |
It looks like |
I found a workaround, that basically do what n.text_input({
autofocus = true,
autoresize = true,
size = 1,
value = signal.value,
border_label = "Go to line",
placeholder = "L:C",
max_lines = 1,
on_change = function(value, component)
signal.value = value
vim.schedule(function()
local modifiable = vim.api.nvim_get_option_value("modifiable", { buf = component.bufnr })
component:set_buffer_option("modifiable", true)
component:set_border_text("bottom", "Length: " .. #value, "right")
component:set_buffer_option("modifiable", modifiable)
end)
end,
on_mount = function(component)
local initial_value = signal.value:get_value()
component:set_border_text("bottom", "Current: " .. r .. ":" .. c, "right")
local _close = function()
renderer:close()
end
vim.api.nvim_create_autocmd({ "BufLeave" }, { callback = _close, once = true })
-- Start visual mode
vim.cmd("normal! v")
end,
})
|
Description
When setting the buffer to start in visual mode, the text input is readonly. Seems similar to #17
Repro
Current Behavior
Input set to readonly
Expected Behavior
Dont set to readonly
NuiComponents version
Main caecfe2
Neovim version
0.10 stable
The text was updated successfully, but these errors were encountered: