-
-
Notifications
You must be signed in to change notification settings - Fork 950
Visual selection moving lines of more than 3 lines does not keep selection #1906
Description
Checklist
- Using a stable version of Neovim (i.e. not neovim nightly)
-
:AstroUpdate - Restarted AstroNvim
Operating system/version
Ubuntu 22.10
Terminal/GUI
Windows terminal
AstroNvim Health
==============================================================================
astronvim: require("astronvim.health").check()
AstroNvim ~
- AstroNvim Version: v3.11.1
- Neovim Version: v0.9.0
- OK Using stable Neovim >= 0.8.0
- OK
gitis installed: Used for core functionality such as updater and plugin management - OK
xdg-openis installed: Used forgxmapping for opening files with system opener (Optional) - WARNING
lazygitis not installed: Used for mappings to pull up git TUI (Optional) - OK
nodeis installed: Used for mappings to pull up node REPL (Optional) - WARNING
gduis not installed: Used for mappings to pull up disk usage analyzer (Optional) - WARNING
btmis not installed: Used for mappings to pull up system monitor (Optional) - OK
pythonis installed: Used for mappings to pull up python REPL (Optional)
Describe the bug
When trying to move a selection of more than 3 lines and keeping the selection after the move, the lines are moved but the selection does not keep. I've provided a screen grab from someone in the discord server showing this behaviour. It works for a selection of 2 lines, but not 3 or more.
The keybind in user/mappings.lua is
v = {
["<A-k>"] = {":m '<-2<CR>gv=gv", desc = "move line up"},
["<A-j>"] = {":m '>+1<CR>gv=gv", desc = "move line down"},
},
I've confirmed these keybinds (:vnoremap <A-k> :m '<-2<CR>gv=gv) work when no configuration is loaded nvim --clean. It also works with 2 lines selected, but no more than that.
Steps to Reproduce
- Clean install of astrovim
- Use the following keymappings or
:vnoremap <A-k> :m '<-2<CR>gv=gv - Try to move a selection of 3 or more lines
Expected behavior
A selection of more than 3 lines should move and keep the selection, similar to the behaviour of using 2 lines.
Screenshots
Screenshare_-_2023-05-16_1_54_52_PM.mp4
Additional Context
No response