Skip to content
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

fix(edit action): update jumlist when moving in same file #3205

Merged
merged 1 commit into from
Jul 25, 2024

Conversation

dhananjaylatkar
Copy link
Contributor

C-o behaves unintuitively when same file is selected at diffrent position.

Description

Jumplist is not updated when moving to different position in same file.

When absolute paths are used in entry maker it causes :edit to be skipped for same file.
Check here -

if vim.api.nvim_buf_get_name(0) ~= filename or command ~= "edit" then

Since :edit is skipped, jumplist is not updated.

This patch updates jumplist when moving to diff position in same file

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

  • tested with

Configuration:

  • Neovim version (nvim --version):
NVIM v0.10.0
Build type: Release
LuaJIT 2.1.1713484068
Run "nvim -V1 -v" for more info
  • Operating system and version:
    Fedora 40

Checklist:

  • My code follows the style guidelines of this project (stylua)
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (lua annotations)

C-o behaves unintuitively when same file is selected at diffrent
position.
@jamestrew
Copy link
Contributor

Which picker are you experiencing this with?
I'm a little confused as there was another PR just a few weeks ago that addressed this for a few pickers.
See: #3175

@dhananjaylatkar
Copy link
Contributor Author

Custom picker - https://github.com/dhananjaylatkar/cscope_maps.nvim/blob/main/lua/cscope/pickers/telescope.lua

I'll just use this opt for now -
push_cursor_on_edit = true

@jamestrew
Copy link
Contributor

Ok, I'll merge this as well.
I suppose it will offer a more intuitive default for when jumping within an buffer.

@jamestrew jamestrew merged commit d39ad2a into nvim-telescope:master Jul 25, 2024
12 checks passed
@jamestrew jamestrew added the backport-0.1.x PR to be backported to 0.1.x (Neovim 0.7 compat) label Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-0.1.x PR to be backported to 0.1.x (Neovim 0.7 compat)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants