Refactor diff search to use new render layout

This commit is contained in:
Kovid Goyal
2023-03-29 13:22:34 +05:30
parent 3dbb830a0e
commit 468168b9de
3 changed files with 43 additions and 38 deletions

View File

@@ -140,7 +140,7 @@ func (ms *MouseSelection) LineBounds(line_pos LinePos) (start_x, end_x int) {
return -1, -1
}
func FormatPartOfLine(sgr string, start_x, end_x, y int) string {
func FormatPartOfLine(sgr string, start_x, end_x, y int) string { // uses zero based indices
// DECCARA used to set formatting in specified region using zero based indexing
return fmt.Sprintf("\x1b[%d;%d;%d;%d;%s$r", y+1, start_x+1, y+1, end_x+1, sgr)
}