vim-doge
vim-doge copied to clipboard
Undo resets cursor position at the top of the file
Describe the bug
Pressing u
in normal mode after generating the documentation will reset the cursor position to the top of the file. I've only tested this with typescript files.
To Reproduce
- Create file
doge.vim
with:
set nocompatible
set runtimepath^=/path/to/vim-doge
filetype plugin indent on
syntax on
set hidden
- Start neovim with command:
nvim -u doge.vim
Steps to reproduce the behavior:
- Type
:set ft=typescript
- Enter insert mode and paste this code:
const a = 5;
function blah(value: number): number {
return 4;
}
- Move your cursor to the 3rd line and press
<Leader>d
- Press
<Escape>
- Press
u
Expected behavior
I expected my cursor to go back to the last location before generating the documentation.
Output of nvim --version
NVIM v0.6.0-dev+274-g6188926e0
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/gcc-11 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_TS_HAS_SET_MATCH_LIMIT -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/home/runner/work/neovim/neovim/build/config -I/home/runner/work/neovim/neovim/src -I/home/runner/work/neovim/neovim/.deps/usr/include -I/usr/include -I/home/runner/work/neovim/neovim/build/src/nvim/auto -I/home/runner/work/neovim/neovim/build/include
Compiled by runner@fv-az65-525
Features: +acl +iconv +tui
See ":help feature-compile"
system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "
/home/runner/work/neovim/neovim/build/nvim.AppDir/usr/share/nvim"
Run :checkhealth for more info