line number and columns are no longer 0 indexed...

This commit is contained in:
Felix Angell 2018-05-06 20:35:35 +01:00
parent cdea5a8101
commit 3218885df8
3 changed files with 2 additions and 2 deletions

0
cpu.prof Normal file
View File

View File

@ -1233,7 +1233,7 @@ func (b *Buffer) renderAt(ctx *strife.Renderer, rx int, ry int) {
ctx.Rect(rx, yPos, gutterWidth, b.h, strife.Fill)
ctx.SetColor(strife.HexRGB(b.buffOpts.lineNumForeground))
ctx.String(fmt.Sprintf("%*d", numLinesCharWidth, start+lineNum), rx+gutterPadPx, yPos)
ctx.String(fmt.Sprintf("%*d", numLinesCharWidth, (start+lineNum)+1), rx+gutterPadPx, yPos)
b.ex = gutterWidth
}

View File

@ -48,7 +48,7 @@ func (b *BufferPane) renderMetaPanel(ctx *strife.Renderer) {
modified = '*'
}
infoLine := fmt.Sprintf("%s%c Line %d, Column %d", b.Buff.filePath, modified, b.Buff.curs.y, b.Buff.curs.x)
infoLine := fmt.Sprintf("%s%c Line %d, Column %d", b.Buff.filePath, modified, b.Buff.curs.y+1, b.Buff.curs.x+1)
ctx.SetColor(strife.HexRGB(conf.Suggestion.Foreground))
_, strHeight := ctx.String(infoLine, b.x+pad, mpY+(pad/2)+1)
metaPanelHeight = strHeight + pad