This fixes fold text rendering when 'rightleft' enabled:
Before:
image.png (view on web)
After:
image.png (view on web)
closes: #2659
https://github.com/vim/vim/pull/19220
(4 files)
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
@zeertzjq commented on this pull request.
> + if !has('rightleft')
+ return
+ endif
+
CheckFeature rightleft
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@noscript pushed 1 commit.
—
View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@noscript commented on this pull request.
Fixed.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Thanks. Instead on only relying on the screen dump test, can you also add a test and use foldtextresult() to validate the result is correct?
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Added foldtextresult() test. Just in case, 'rightleft' does not affect foldtextresult().
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
oh it doesn't? That sounds wrong.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
My expectation is that 'rightleft' only affects the rendering. So if any tool depends on foldtextresult() output, it would be unaffected.
But I don't mind fixing foldtextresult() as well.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
My expectation is that'rightleft'only affects the rendering. So if any tool depends onfoldtextresult()output, it would be unaffected.
My bad,
foldtextresult()documentation says it returns the displayed text. So I need to fix it too.
I think that will break the TOhtml plugin. At two places it uses foldtextresult() with the default 'foldtext' to determine fold level. It's possible that other plugins may use foldtextresult() for this purpose too.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
But the whole purpose of TOhtml is to create a html page that looks like what is displayed in Vim. So foldtextresult() should return reversed text, no?
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Yes, but not every foldtextresult() call in TOhtml is for displaying.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Alright, then skip foldtextresult() for now.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Should I drop foldtextresult() test?
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
that is fine, thanks
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()