Comments (7)
Not sure how that would happen, this plugin uses the complete :undolist
. Can you compare the output of that with what your seeing on both plugins? Are the state numbers in telescope-undo continuous and without gaps too?
Also, I'm going to need a reproducible case where the two diverge. Can you provide a series of inputs to conjure a file? I.e. iline one<esc>oline two<esc>yypA1<esc>
...
However, I can't imagine how this happens, as both plugins use the undolist built in and just render that.
from telescope-undo.nvim.
Took some screenshots.
Heres the last state in undotree and telescopeundo compared:
It seems that all states appear, but they dont appear in correct order on telescopeundo. I'm assuming this is due to the ascending sort order in my ts config that screws with the branch alignment
from telescope-undo.nvim.
I can reproduce by creating a new file, and inputting "hello" in the first line.
I then yank the line and paste over and over (~350 times)
Undotree goes to 0, and telescope-undo only goes to 121
from telescope-undo.nvim.
I'm on vacation and can test it out myself right now. Some further things you can try:
- At the bottom, your screenshots show that the buffer is not modifiable -> that will lead to telescope-undo exiting without doing anything further. Why is your buffer not modifiable? Maybe this is some strange behaviour from having the undo tree focused?
- If you have branches, it is correct that you don't have some states in linear order. They should be all accounted for inside a subtree.
- Did you compare to
:undolist
as well? - Can you find an undostate at position 50 when you do your 350 undostates example? You'd have to sneak in a
world
in your hello example at one of the early positions that you can search for. - Do you have some sort of result limiter as part of your telescope config? It's possible that something like this exists and has been configured. It's not a nvim/telescope default though.
from telescope-undo.nvim.
- Can you find an undostate at position 50 when you do your 350 undostates example? You'd have to sneak in a
world
in your hello example at one of the early positions that you can search for.- Do you have some sort of result limiter as part of your telescope config? It's possible that something like this exists and has been configured. It's not a nvim/telescope default though.
Arh, yes i can. It is able to find previous states, that otherwise don't show in the list.
It might be relateed to this max list length item:
nvim-telescope/telescope.nvim#2779
Corresponds to about 250 lines as well
And here's after searching for world. States that were previously hidden are now visible:
I don't have anything to limit the list configured in telescope, but that may be the issue then
Heres my config
return {
'nvim-telescope/telescope.nvim',
dependencies = {
'nvim-lua/plenary.nvim',
'nvim-telescope/telescope-file-browser.nvim',
'debugloop/telescope-undo.nvim',
{
'nvim-telescope/telescope-fzf-native.nvim',
build = 'make',
},
},
config = function()
local ts = require('telescope')
local ts_undo = require('telescope-undo.actions')
ts.setup {
defaults = {
borderchars = { '─', '│', '─', '│', '┌', '┐', '┘', '└' },
layout_strategy = 'horizontal',
sorting_strategy = 'ascending',
layout_config = {
prompt_position = 'top',
width = 0.8,
height = 0.8,
preview_width = 0.5,
},
},
pickers = {
find_files = {
find_command = {
'fd',
'--type',
'f',
'-H',
'--strip-cwd-prefix',
}
}
},
extensions = {
file_browser = {
hijack_netrw = true,
hide_parent_dir = true,
hidden = {
file_browser = false,
folder_browser = false,
},
display_stat = { },
mappings = {
['n'] = {
['-'] = ts.extensions.file_browser.actions.goto_parent_dir,
['<BS>'] = ts.extensions.file_browser.actions.goto_parent_dir,
-- KEYBIND TO OPEN SELECTED FILES
},
}
},
undo = {
mappings = {
i = {
['<cr>'] = ts_undo.restore,
['<C-cr>'] = ts_undo.restore,
['<C-y>'] = ts_undo.yank_deletions,
['<C-r>'] = ts_undo.yank_additions,
},
n = {
['y'] = ts_undo.yank_additions,
['r'] = ts_undo.yank_deletions,
['<cr>'] = ts_undo.restore,
},
},
}
}
}
ts.load_extension('file_browser')
ts.load_extension('fzf')
ts.load_extension('undo')
end,
}
from telescope-undo.nvim.
Seems you found the culprit in that other issue, yes 👍🏻 I read through your config, looking good, nothing out of the ordinary. I assume my nvim would behave the same way if I could check it right now.
Thanks for reporting and thus documenting this here, but I'm going to close this for now until there's something actionable :)
I know once noticed stuff like this can be nagging, but in all honesty: There should not be a scenario where you need more that those 250ish undo states since your last git commit 😅 Especially since searching still works, too ;)
from telescope-undo.nvim.
Seems you found the culprit in that other issue, yes 👍🏻 I read through your config, looking good, nothing out of the ordinary. I assume my nvim would behave the same way if I could check it right now.
Thanks for reporting and thus documenting this here, but I'm going to close this for now until there's something actionable :)
I know once noticed stuff like this can be nagging, but in all honesty: There should not be a scenario where you need more that those 250ish undo states since your last git commit 😅 Especially since searching still works, too ;)
Yes, that seems to be it. I don't think it'll ever be a "real" issue, but sometimes you notice something that nags you anyway,even if irrational :)
Thank you for the quick replies
from telescope-undo.nvim.
Related Issues (20)
- Bug: Instead of re-using scrolloff, let's have an specific option HOT 1
- Bug: Preview show "[Process exited 0]" when delta is used HOT 1
- Add support for telescope theme HOT 4
- Add an option to merge yank_addition and yank_deletion HOT 2
- Incompatibility with Zellij HOT 1
- Does not work with page and neovim remote HOT 2
- [Feature request]: Show which version is currently saved HOT 1
- Expected behavior of key mappings seems like they are not working. HOT 10
- Restore does not seem to be working HOT 1
- Diff Preview Against Current File HOT 8
- Error : after the second argument: expected table, got nil HOT 5
- u_undo: line numbers wrong HOT 1
- delta in wsl not working HOT 3
- [Bug / Question] Undo preview only showing difference HOT 2
- Toggle between diff preview and the actual state preview HOT 3
- Unable to disable default key mappings HOT 3
- Diff View output is wrong HOT 6
- Clear undo history HOT 1
- Global function timeago
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from telescope-undo.nvim.