Open muniter opened 3 years ago
I can reproduce this, but can't figure out what's causing it.
If you check the mark (using vim.api.nvim_buf_get_mark
) after key_func
here, the mark is still as expected.
But if you check it after the mapping has completed (and the user has control again), the mark has changed.
I don't know what could possibly be changing the mark between these two points in time.
This bug still repros for me, and I'd love to help fix it, because "1) open file, 2) gi
" is a really common workflow for me. It may be relevant that although gi
(insert at last edit) and '^
(jump to end of last edit) are affected, '.
(jump to start of last edit) is not affected.
Description
Pickers that do not go to a different buffer change the last insert mode location ("^" mark) of the buffer it was called from. When the action select was performed while the prompt is in insert mode.
Expected Behavior
Telescope should not modify the buffer it was called from, last insert mode location ("^" mark) should not change to the line telescope was called from.
Actual Behavior
Telescope changes the last insert mode location which disrupt the flow of the user since now
gi
is the location telescope was called from. This only happens if the picker does not change the bufferFor some reason
stopinsert
is not working. https://github.com/nvim-telescope/telescope.nvim/blob/1fefd0098e92315569b71a99725b63521594991e/lua/telescope/actions/init.lua#L209-L211Details
Reproduce
1. nvim -nu test.vim 2. enter insert mode 3. add a few lines to the file: ``` 1 2 3 4 ``` 4. leave insert mode 5. check your last insert mode location `marks ^` 6. move to a diferent line that's not the last insert mode location 7. :Telescope current_buffer_fuzzy_find 8. pick any entry from the picker but do not leave insert mode in the picker/prompt using `Environment
- nvim --version output: NVIM v0.5.0-dev+1319-g7c9569702 - Operating system: Linux 5.8.0-53-generic #60~20.04.1-Ubuntu x86_64 GNU/Linux - Telescope commit: 69eb5eaConfiguration
```viml " Plug Configuration {{{ call plug#begin('~/.config/nvim/plugged') Plug 'nvim-lua/popup.nvim' Plug 'nvim-lua/plenary.nvim' Plug 'nvim-telescope/telescope.nvim' call plug#end() lua require('telescope').setup() ```