Closed zaiqiang-dong closed 3 months ago
Hi @zaiqiang-dong
I'm not able to repro this issue. Can elaborate on steps to repro. Also provide your config.
PS. cscope_maps.nvim does not modify jumplist so it should not create any regression for it.
my cscope_maps.nvim config is:
return {
"dhananjaylatkar/cscope_maps.nvim",
event = "VeryLazy",
-- commit = "4086cbb0fa1553830a3a27e3efe57adf6ebe5531",
dependencies = {
{ "tpope/vim-surround" },
{ "dhananjaylatkar/cscope_maps.nvim" },
{ "folke/which-key.nvim" },
{ "nvim-telescope/telescope.nvim" },
},
config = function()
require("cscope_maps").setup({
cscope = {
db_file = "./cscope.out", -- location of cscope db file
exec = "cscope", -- "cscope" or "gtags-cscope"
use_telescope = true, -- true will show results in telescope picker
picker = "telescope",
db_build_cmd_args = { "-bqkv" }, -- args used for db build (:Cscope build)
},
disable_maps = true,
vim.api.nvim_set_keymap(
"n",
"cs",
[[<cmd>lua require('cscope_maps').cscope_prompt('s', vim.fn.expand("<cword>"))<cr><cr>]],
{ noremap = true, silent = false }
),
vim.api.nvim_set_keymap(
"n",
"cd",
[[<cmd>lua require('cscope_maps').cscope_prompt('g', vim.fn.expand("<cword>"))<cr><cr>]],
{ noremap = true, silent = false }
),
vim.api.nvim_set_keymap(
"n",
"cc",
[[<cmd>lua require('cscope_maps').cscope_prompt('c', vim.fn.expand("<cword>"))<cr><cr>]],
{ noremap = true, silent = false }
),
})
end,
}
jump is like this:
return whih ctrl+o like this:
hey @zaiqiang-dong
issue is due to how telescope handles absolute paths. When abs path is given to telescope, it only changes cursor position. Changing cursor position does not update jumplist.
I would suggest you to use <C-t>
until telescope merges https://github.com/nvim-telescope/telescope.nvim/pull/3205.
BTW, which colorscheme are you using?
hey @zaiqiang-dong
issue is due to how telescope handles absolute paths. When abs path is given to telescope, it only changes cursor position. Changing cursor position does not update jumplist.
I would suggest you to use
<C-t>
until telescope merges nvim-telescope/telescope.nvim#3205.
OK,got it, thanks,.
BTW, which colorscheme are you using?
I only use a colors.vim and config by myself.
Added workaround in cscope
since it will take time for telescope PR to merge!
Describe the bug Cannot return to the previous jump position using Ctrl+O with the latest version back to : commit 4086cbb0fa1553830a3a27e3efe57adf6ebe5531 Author: Dhananjay dhananjay.latkar@gmail.com Date: Thu Jul 4 14:02:37 2024 +0530
works ok!!!
To Reproduce Steps to reproduce the behavior:
Expected behavior ctrl+o can return old position.
Screenshots If applicable, add screenshots to help explain your problem.
nvim version (please complete the following information): NVIM v0.10.0 Build type: Release LuaJIT 2.1.1713484068 Run "nvim -V1 -v" for more info