]> git.lizzy.rs Git - micro.git/commitdiff
Fix rehighlight for retab
authorZachary Yedidia <zyedidia@gmail.com>
Mon, 10 Feb 2020 19:49:08 +0000 (14:49 -0500)
committerZachary Yedidia <zyedidia@gmail.com>
Mon, 10 Feb 2020 19:49:08 +0000 (14:49 -0500)
internal/buffer/buffer.go

index fd820c3e51e18cb4406dddd5577d0946e19d08df..402aeffa782996e97aa4e517f94ae292bb88ba11 100644 (file)
@@ -18,6 +18,7 @@ import (
 
        luar "layeh.com/gopher-luar"
 
+       dmp "github.com/sergi/go-diff/diffmatchpatch"
        "github.com/zyedidia/micro/internal/config"
        ulua "github.com/zyedidia/micro/internal/lua"
        "github.com/zyedidia/micro/internal/screen"
@@ -26,7 +27,6 @@ import (
        "golang.org/x/text/encoding/htmlindex"
        "golang.org/x/text/encoding/unicode"
        "golang.org/x/text/transform"
-       dmp "github.com/sergi/go-diff/diffmatchpatch"
 )
 
 const backupTime = 8000
@@ -908,6 +908,7 @@ func (b *Buffer) Retab() {
 
                l = bytes.TrimLeft(l, " \t")
                b.lines[i].data = append(ws, l...)
+               b.Modifications = append(b.Modifications, Loc{i, i})
                dirty = true
        }