-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Closed
Labels
complexity:lowLow-risk, self-contained. Do NOT ask "can I work on this", just read CONTRIBUTING.mdLow-risk, self-contained. Do NOT ask "can I work on this", just read CONTRIBUTING.md
Description
Neovim version (nvim -v)
0.8.0
Vim (not Nvim) behaves the same?
n/a
Operating system/version
macOS 12.6
Terminal name/version
iterm2
$TERM environment variable
tmux-256color
Installation
build from repo
How to reproduce the issue
Create two files:
- init.lua:
local function move_line(dir)
vim.cmd('keepj norm! mv')
vim.cmd('move ' .. (dir == 'up' and '--' or '+') .. vim.v.count1)
vim.cmd('keepj norm! =`v')
end
vim.keymap.set('n', '[d', function() move_line('up') end, {})
vim.keymap.set('n', ']d', function() move_line('down') end, {})
vim.opt.jumpoptions = 'view'
- test.lua
if true then
print('hi')
end
Then open neovim (nvim -u init.lua test.lua
) and hit ]d
in normal mode.
Expected behavior
The viewport should not change position (i.e. no scrolling)
Actual behavior
The viewport scrolls down a line
Note that this issue repros similarly when moving a line upwards ([d
), but the viewport needs to not be at the top (such that it's possible to scroll up).
Metadata
Metadata
Assignees
Labels
complexity:lowLow-risk, self-contained. Do NOT ask "can I work on this", just read CONTRIBUTING.mdLow-risk, self-contained. Do NOT ask "can I work on this", just read CONTRIBUTING.md