v.Height--
}
- for _, pl := range loadedPlugins {
+ for pl := range loadedPlugins {
_, err := Call(pl+".onViewOpen", v)
if err != nil && !strings.HasPrefix(err.Error(), "function does not exist") {
TermMessage(err)
v.ScrollDown(1)
y = v.Height + v.Topline - 1
}
- if y >= v.Buf.NumLines {
- y = v.Buf.NumLines - 1
- }
if y < 0 {
y = 0
}
v.Buf.Insert(v.Cursor.Loc, string(e.Rune()))
v.Cursor.Right()
- for _, pl := range loadedPlugins {
+ for pl := range loadedPlugins {
_, err := Call(pl+".onRune", string(e.Rune()), v)
if err != nil && !strings.HasPrefix(err.Error(), "function does not exist") {
TermMessage(err)
v.drawCell(screenX-v.leftCol, screenY, ' ', nil, lineStyle)
}
}
+ strWidth += remainder
} else if runewidth.RuneWidth(ch) > 1 {
if screenX-v.x-v.leftCol >= v.lineNumOffset {
v.drawCell(screenX, screenY, ch, nil, lineStyle)
v.drawCell(screenX-v.leftCol, screenY, '<', nil, lineStyle)
}
}
+ strWidth += StringWidth(string(ch), tabSize)
} else {
if screenX-v.x-v.leftCol >= v.lineNumOffset {
v.drawCell(screenX-v.leftCol, screenY, ch, nil, lineStyle)
}
+ strWidth += StringWidth(string(ch), tabSize)
}
charNum = charNum.Move(1, v.Buf)
screenX++
colN++
- strWidth += StringWidth(string(ch), tabSize)
}
// Here we are at a newline