Repository navigation
Conversation
…itor code - A fold that shows keeps the selection and the hits of a find on their lines, and the cursor goes to the first line of the fold, also at the top. - An unknown editor gets +line again. open and xdg-open are window openers. - Split the editor command into templateCommand and envCommand, and make the table without init. - Rename the fold option Show to Expanded, key the expanded folds by a struct, and convert the fold types with named fields. - Simpler tests, with shared helpers for scripts and a fake rex.
…ead quoted editor paths - Key an expanded fold by its old line number, which does not change while the agent edits the files. - Read the program of an editor in quotes, so a path with spaces works. - Tell in the README how to open an unknown editor in a window.
…hem after a commit - An expanded fold is a range of old lines. An agent edit in the range keeps all its lines open. - A new old content, for example after a commit or a new turn, closes the expanded folds of the file. - editorCommand has window in place of terminal, and program uses CutPrefix. - diffview folds each hunk, so the folds always match the hunks. - Simpler comments.
…olds after a restart - A fold that overlaps an expanded range shows. An undo of a change next to the range makes a larger fold, which shows as a whole. - The state of a restart for an update keeps the expanded folds, so the cursor comes back to its line. - The old content of a file is kept as a hash. - Tell in the README that EDITOR comes from the login shell.
- Follow the Google Go style guide: one-line signatures and calls, no string literals split only for length, doc comments on the exported const groups, no names that hide functions or a named result. - Modern Go: slices.Compare, slices.IndexFunc, slices.Compact, a min with three values, errors.Is with fs.ErrNotExist, strconv.Itoa. - Comments in ASD-STE100: one idea in each sentence, present tense, test doc comments of one sentence, and no semicolons that join ideas. No change in behavior.
- Files uses git ls-files --deduplicate. In a merge conflict, git lists a path once for each stage, so the Files tab showed it three times. - renderChanges gets the comments once for all the folds of a file. - Small simplifications and present-tense comments.
Owner
Author
|
Merged into master through #10. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #7. The review rounds and the codebase pass after the three fixes.
Review fixes (from 2× /p-simplify and 3× /p-review)
Showis renamedExpanded.+lineagain, as on master.openandxdg-openare window openers.templateCommandandenvCommandreplace one function with two modes.Fileslists a path in a merge conflict once (git ls-files --deduplicate, git 2.31, which rexdiff already needs).EDITORwith zsh, and the git version.Codebase pass
slices.Compare,slices.IndexFunc,slices.Compact,minwith three values,errors.Is(err, fs.ErrNotExist).Tests added
TestExpandKeepsPlaces,TestFoldStaysOpen(edit above, edit inside, undo next to, commit),TestFoldsSurviveRestart,TestFilesInConflict, more cases inTestEditorCommands. I checked that each new test fails without its fix.Checks
go test -race ./...,go vet, golangci-lint (0 issues), staticcheck with all checks,go fixand modernize (no changes). End-to-end in Rex with the real toggle: folds,→,:20, and micro at(20,1).