Skip to content

fix: restore the CmdVisitNextLine/CmdVisitPrevLine visit commands - #11

Merged
firstrow merged 2 commits into
wig-editor:masterfrom
lecheel:master
Aug 21, 2026
Merged

fix: restore the CmdVisitNextLine/CmdVisitPrevLine visit commands#11
firstrow merged 2 commits into
wig-editor:masterfrom
lecheel:master

Conversation

@lecheel

@lecheel lecheel commented Aug 20, 2026

Copy link
Copy Markdown
Contributor
  • Add findVisitSourceBuffer to prioritize [rgcollect buffers
  • Update CmdVisitNextLine and CmdVisitPrevLine to use discovered source buffer
  • Ensure visit operations target the active window

- 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
@firstrow

Copy link
Copy Markdown
Collaborator

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.

@lecheel

lecheel commented Aug 20, 2026

Copy link
Copy Markdown
Contributor Author

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.
what happen to the navigation in history maybe the huge commit in once during merge ? yes with master all step features commit is gone, which only can see in my feature branches

@firstrow

Copy link
Copy Markdown
Collaborator

@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})

  • plus added git_view feature that you might like to port to your fork.

@firstrow
firstrow merged commit 0fe9e90 into wig-editor:master Aug 21, 2026
@lecheel

lecheel commented Aug 21, 2026

Copy link
Copy Markdown
Contributor Author

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.

@firstrow

Copy link
Copy Markdown
Collaborator

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.

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