fix(files): ensure that file-preview includes the first column - #2515
Conversation
2cf47f6 to
0e3fe65
Compare
echasnovski
left a comment
There was a problem hiding this comment.
Thanks for the PR!
I'd like to try to find the exact culprit of the problem instead of using *.h file.
|
Oh, I only now have seen the second edit of this comment. The culprit is that the file contains a line with three or more If that's the case, then I the more appropriate solution is to not tweak cursor when window shows a buffer for a file. And instead of adding a new file, prepending the I think inlining the |
0e3fe65 to
7a32ee4
Compare
|
I pushed a new commit. For the test I used |
echasnovski
left a comment
There was a problem hiding this comment.
Already much better! Both the code+test changes and the commit message. There are still small tweaks to make it more polished.
b2e4cd8 to
ea7b5a7
Compare
Details: - Preview position for a file should always include the first column. When the first line of a file is long and has 3 slashes, the text shown in preview started from another column, hiding text to the left. The solution is to not 'tweak' the cursor when the window shows a file. Resolve nvim-mini#2514
ea7b5a7 to
8b8af76
Compare
echasnovski
left a comment
There was a problem hiding this comment.
Thanks for working on this!
Resolve #2514
Test
Preview works for fileshas been modified to also include the case where the preview did not start from zero cursor position. As a consequence, I had to regenerate some screenshots in test cases also using thereal_pathdirectory.