fix: restore the CmdVisitNextLine/CmdVisitPrevLine visit commands - #11
Conversation
- Add `findVisitSourceBuffer` to prioritize `[rgcollect` buffers - Update `CmdVisitNextLine` and `CmdVisitPrevLine` to use discovered source buffer - Ensure visit operations target the active window
- Handle trailing newline in `Append` to avoid bogus empty lines - Prevent git diff noise and undo/redo accumulation of blank lines
|
Hi @lecheel. Thanks for your contributions. I appreciate it. But code changes are coming really fast, as I understand with some AI assisted coding tools. Which is fine for scope of this project. But it might be better approach to discuss PRs ahead if you are interested in contributions. E.g. git tools is really cool, but it would be nice to also commit changes with message, pull/push. Plus I've notices navigation in history is a bit weird now after interacting with git buffers. And small things like that. It would be nice to slow down a bit and polish out existing code. Cheers. |
|
hi @firstrow. I understand that things are moving a bit too fast right now. I've actually ported this same thing a few times before—once in Rust for the https://github.com/lecheel/amp project, and twice for my own https://github.com/lecheel/ce. It’s really exciting to do it again, this time in Go with Wig. The core features are almost there now, so right now we just need to focus on some polish and bug fixes. |
|
@lecheel, I see you like text editors ;) I'm currently working on GPU rendered editor. A whole new set of problems to get done and a lot of new things to learn. Regarding history jump. I've already fixed that. The issues was in CmdKillBuffer, "go to prew buffer was used" instead of correct CmdJumpBack, which tracks all jumps with ctx.Editor.ActiveWindow().VisitBuffer(ctx, wig.Cursor{Line: 0, Char: 0})
|
|
thx @firstrow, oh nice a GPU rendered editor like zed ?, should be interesting every domain has own learning curve and more challenge in async I/O and data races. |
|
yes, something like zed. Had to learn a bunch of rendering stuff and how to make it multi threaded. Plus manual memory management forces to think a bit differently about objects lifetime and generally be careful. |
findVisitSourceBufferto prioritize[rgcollectbuffersCmdVisitNextLineandCmdVisitPrevLineto use discovered source buffer