You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When enabling Bidi-Mode, get window width and textwidth (see which is longer).
Use that width to inform fribidi of the padding length for the current line depending on base direction.
Insert contents into buffer, but I think it should also insert some symbol to designate a line break,
so that on a change in textwidth (using SetOption event) or window size (using WindowResized event) lets some function re-wrap the lines accordingly.
↳ or ↪︎ might be good options to use on the left side of the buffer to indicate a line should wrap with the above.
For example (the m's are just to force the base direction as LTR)
This function doesn't have to be super efficient since it only is triggered when the display changes, not when the user is actively editing the file.
I can also add an option to change what the linebreak indicator is.
Things get especially tricky when the user is typing though.
I will have to add an autocmd that listens for InsertCharPre on the current line and updates the whitespace accordingly.
When it comes to wrapping text, I'll have to watch the line-length without padding and jump the user to a new line with padding when the chars reach col 0 (and bring the current word if needbe).
If the user backspaces when in the textwidth/window-width column on a wrapped line,
delete the line and move the cursor back up.
The text was updated successfully, but these errors were encountered:
Unfortunately, this is too clunky and slow to implement at the moment.
I may retry dynamic padding (and hence the ML and MR modes)
if I ever begin to use native C with fribidi.
This might be clunky…
When enabling
Bidi-Mode
, get window width and textwidth (see which is longer).Use that width to inform fribidi of the padding length for the current line depending on base direction.
Insert contents into buffer, but I think it should also insert some symbol to designate a line break,
so that on a change in
textwidth
(usingSetOption
event) or window size (usingWindowResized
event) lets some function re-wrap the lines accordingly.↳ or ↪︎ might be good options to use on the left side of the buffer to indicate a line should wrap with the above.
For example (the m's are just to force the base direction as LTR)
This function doesn't have to be super efficient since it only is triggered when the display changes, not when the user is actively editing the file.
I can also add an option to change what the linebreak indicator is.
Things get especially tricky when the user is typing though.
I will have to add an autocmd that listens for
InsertCharPre
on the current line and updates the whitespace accordingly.When it comes to wrapping text, I'll have to watch the line-length without padding and jump the user to a new line with padding when the chars reach col 0 (and bring the current word if needbe).
If the user backspaces when in the textwidth/window-width column on a wrapped line,
delete the line and move the cursor back up.
The text was updated successfully, but these errors were encountered: