Repository navigation
Conversation
A sideways scroll renders the diff again, and each render highlighted every line again with chroma. diff.Cache keeps the highlighted lines, and the tui keeps one Cache for all renders. On a 5,000-line file, a scroll key takes 8 ms in place of 20 ms with the folds closed, and 11 ms in place of 180 ms in the Files tab.
On a deleted line, e opened the file at line 1. It now opens at the first new line below the cursor, else the last new line above it.
A file with an unknown name gets its lexer from the content, and that scan took 30 ms on each render of a 5,000-line file. Also simplify the cache comments and the benchmark.
…diff - internal/editor builds the editor command, so tui only runs it. - internal/termtext has Plain and Quote, which diff exported before. - vcs.PullRequest removes control characters from the text itself, so every caller gets safe text.
Comments use the present tense, one idea in each sentence, and lines of 80 columns or fewer. Each test failure message tells what it got and what it wants. No code changes.
- editor.Template, editor.Program, and editor.ShellQuote replace FromTemplate, FromEditor, and Quote. - The View reads the lexer from its Cache only. - Fix a doc link to termtext.Quote.
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 #8.
eopens the editor at the nearest new line instead of line 1.vcs.PullRequestcleans the pull request text itself. Comments use plain English, and test failures tell what they want.