-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix highlight problem of git diff #24336
base: main
Are you sure you want to change the base?
Conversation
related go-gitea#23176 try fix it with @silverwind solution in go-gitea#23176 (comment) looks the result is good. but looks it will cost to much memorry when the file is large. maybe limt the max file size? Signed-off-by: a1012112796 <1012112796@qq.com>
Hmm yes, full file highlight is expensive. Might need a option for max line count after which to fall back to the cheap method. Kind of similar to |
Signed-off-by: a1012112796 <1012112796@qq.com>
Signed-off-by: a1012112796 <1012112796@qq.com>
no change about algorithm. but render full file instead of render it line by line. ref: #23176 (comment) |
I mean , does the old style diff still work? This feature is pretty useful. |
Oh, I see. sorry, I forgot it, will fix it later. |
Signed-off-by: a1012112796 <1012112796@qq.com>
@wxiaoguang fixed 4362fa6 |
Signed-off-by: a1012112796 <1012112796@qq.com>
Haven't looked into details, some quick thoughts after a quick review:
|
I'd like try some refactor to make |
related #23176
try fix it with @silverwind solution in #23176 (comment)
looks the result is good. but looks it will cost to much memorry when the file is large. maybe limt the max file size?