Skip to content

[feat] crude version of line wrapping implemented - #23

Merged
hiroaqii merged 6 commits into
hiroaqii:mainfrom
pierrelgol:feat/linewrap
Oct 10, 2026
Merged

hiroaqii merged 6 commits into
hiroaqii:mainfrom
pierrelgol:feat/linewrap

Conversation

@pierrelgol

Copy link
Copy Markdown
Contributor

Hi, I love this utility, but one thing it was lacking for me is the line wrapping, So currently I've implemented a crude version, which can be tested, but there are limitations, that I can't really solve myself, I've started this morning, and I've something that works, but not perfectly, the known limitations are :

  • if a line is taller than the pane, it can't be scrolled and doesn't fit, so the only way to do this is to toggle it off and scroll
  • I don't really know how to handle wide characters like emojis, or at least don't know what's best to do, so I drop them which obviously isn't great (but who's the maniac who puts emoji in code)
  • there might be more, for example I haven't touched much at cursors.

I tried to keep it minimal.

AI DISCLOSURE:

Ai was used, during the process of mapping which files, needed to be changed, and where, and Ai wrote the test in render.zig. Other than that I've made the changes myself, which is probably why it's a bit limited. Obviously you don't have to merge this, but if you could implement the feature, that would be really nice :)

@hiroaqii

hiroaqii commented Oct 8, 2026

Copy link
Copy Markdown
Owner

Thanks a lot for the PR and for clearly documenting its limitations! Line wrapping is a feature I'd like to have in gitframe.

I tested your implementation and confirmed the wrap-boundary issue with wide characters, including CJK characters and emoji, as well as the long-line scrolling limitation you mentioned. I also found that the search marker can point to the wrong row when earlier lines wrap, and that toggling line numbers can push the cursor off screen.

I think this is a useful starting point. Getting it ready to merge will require some changes to how wrapped rows are handled across rendering, scrolling, and cursor positioning. I'd also like to use a different keybinding for the toggle.

Would you be okay with me taking it from here and finishing the implementation? I'll keep your original commit in the history to preserve your authorship.

@pierrelgol

Copy link
Copy Markdown
Contributor Author

Oh yes absolutely, I got nerd snipped into it because I didn't think it would be hard (which every engineer said lol) but then deep into it I realised there's a lot more edge cases than I had realized, which is why I thought it would be useful to share it, but probably better if you take it from here :)

@hiroaqii
hiroaqii marked this pull request as ready for review October 10, 2026 04:48
@hiroaqii
hiroaqii merged commit d27b1da into hiroaqii:main Oct 10, 2026
7 checks passed
@hiroaqii

Copy link
Copy Markdown
Owner

Thanks again for the initial line-wrapping implementation! I’ve merged this PR and released the completed feature in v0.1.7. Thank you for getting this started!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants