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
First of all, thank you so much for creating this amazing tutorial. I went through the tutorial, built my own kilo, and now I'm trying to implement all the functions listed in the Appendix. However, I'm stuck on "soft-wrap lines."
What I came up with is making render an array of strings. Then, every time I update a row, I split the characters into an array. But when doing so, it gets complicated very quickly. The hl array also needs to change to an array type since it syncs with render. I end up dealing with a lot of malloc and realloc calls, and I need to introduce a new state, ry, to track the cursor's vertical coordinate.
So, I wonder if there is any simpler way to implement this?
The text was updated successfully, but these errors were encountered:
First of all, thank you so much for creating this amazing tutorial. I went through the tutorial, built my own
kilo
, and now I'm trying to implement all the functions listed in the Appendix. However, I'm stuck on "soft-wrap lines."What I came up with is making
render
an array of strings. Then, every time I update a row, I split the characters into an array. But when doing so, it gets complicated very quickly. Thehl
array also needs to change to an array type since it syncs withrender
. I end up dealing with a lot ofmalloc
andrealloc
calls, and I need to introduce a new state,ry
, to track the cursor's vertical coordinate.So, I wonder if there is any simpler way to implement this?
The text was updated successfully, but these errors were encountered: