Open yousef8192 opened 1 month ago
The parameters for seek
are just rough estimates, not precise values, because it's impossible to achieve that in implementation - different previewers interpret these parameters in different ways.
For example, with PDFs, it's in pages with a unit of 1; with videos, it's in percentages with a unit of 5%; and with codes, it's the available window space divided by 10.
I'm not sure which previewer you're using, but you can check out the specific code here: https://github.com/sxyazi/yazi/tree/main/yazi-plugin/preset/plugins
The documentation for previewers is available here: https://yazi-rs.github.io/docs/plugins/overview#previewer
Thanks for the clarification.
What about creating an option for text previews so that the unit is lines instead of in terms of the available window space so that both options are doable? I guess this could be done if there is a way to obtain the font size (specifically the height) of a single character in the terminal or something
What system are you running Yazi on?
Linux X11
What terminal are you running Yazi in?
terminator 2.1.2
yazi --debug
outputDid you try the latest nightly build to see if the problem got fixed?
No, and I'll explain why below
Describe the bug
It seems that n can't be set to a number below 5 (Maybe this is related to scrolloff? Although I did set scrolloff = 0 and still n can't get below 5) and setting it below 5 has no effect and the seek value is still 5.
What I tested is the latest release as of the time of writing this issue (Yazi 0.2.5 (https://github.com/sxyazi/yazi/commit/c65a14c0e650c92cce52fe507b9f84a873cae44d 2024-04-23) is the output of yazi --version). I am not really sure which build is considered the latest nightly build so I can't confirm if I tried it or not sorry. Please let me know which one is it and I will try it to see if the issue exists there too.
If any further information is needed please let me know. Thanks a lot for the amazing tool!!
Expected Behavior
When n is set to m where m is a number below 5, it actually seeks m units in the preview and not 5 units.
To Reproduce
Backup your keymap.toml and replace it with the following :
"$schema" = "https://yazi-rs.github.io/schemas/keymap.json"
[manager]
prepend_keymap = [
]
Configuration
Tested without configurations except for what's mentioned in the "To Reproduce" Section.
Anything else?
No response