mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-08-04 14:46:03 +00:00
Implement syntax highlighting
This commit is contained in:
parent
4d61ad87b3
commit
c2e549b79c
8 changed files with 280 additions and 18 deletions
|
|
@ -367,13 +367,13 @@ func lines_for_diff(left_path string, right_path string, patch *Patch, columns,
|
|||
available_cols := columns/2 - margin_size
|
||||
data := DiffData{left_path: left_path, right_path: right_path, available_cols: available_cols, margin_size: margin_size}
|
||||
if left_path != "" {
|
||||
data.left_lines, err = lines_for_path(left_path)
|
||||
data.left_lines, err = highlighted_lines_for_path(left_path)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
}
|
||||
if right_path != "" {
|
||||
data.right_lines, err = lines_for_path(right_path)
|
||||
data.right_lines, err = highlighted_lines_for_path(right_path)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
|
@ -405,7 +405,7 @@ func all_lines(path string, columns, margin_size int, is_add bool, ans []*Logica
|
|||
if !is_add {
|
||||
ltype = `remove`
|
||||
}
|
||||
lines, err := lines_for_path(path)
|
||||
lines, err := highlighted_lines_for_path(path)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue