1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-01 00:54:58 +02:00

Better escape code parsing (thanks to Ryooooooga) (#2514)

This commit is contained in:
Jesse Duffield
2023-03-19 15:41:47 +11:00
committed by GitHub
parent e6274af015
commit b542579db3
90 changed files with 896 additions and 348 deletions

View File

@ -812,6 +812,20 @@ func (v *View) SetContent(str string) {
v.writeString(str)
}
func (v *View) CopyContent(from *View) {
v.writeMutex.Lock()
defer v.writeMutex.Unlock()
v.clear()
v.lines = from.lines
v.viewLines = from.viewLines
v.ox = from.ox
v.oy = from.oy
v.cx = from.cx
v.cy = from.cy
}
// Rewind sets read and write pos to (0, 0).
func (v *View) Rewind() {
v.writeMutex.Lock()