]> git.lizzy.rs Git - micro.git/blobdiff - internal/buffer/buffer_test.go
Fix v2 import path for go mod
[micro.git] / internal / buffer / buffer_test.go
index d5a027b410b033b58ee2be9bb44c79508191cff5..ea017156b36951c695b72dddd5fde5daba9a291e 100644 (file)
@@ -7,7 +7,7 @@ import (
        testifyAssert "github.com/stretchr/testify/assert"
        lua "github.com/yuin/gopher-lua"
 
-       ulua "github.com/zyedidia/micro/internal/lua"
+       ulua "github.com/zyedidia/micro/v2/internal/lua"
 )
 
 type operation struct {
@@ -79,7 +79,6 @@ func check(t *testing.T, before []string, operations []operation, after []string
                cursor := cursors[i]
                b.SetCurCursor(cursor.Num)
                cursor.DeleteSelection()
-               cursor.ResetSelection()
                b.Insert(cursor.Loc, strings.Join(op.text, "\n"))
        }
 
@@ -95,7 +94,7 @@ func check(t *testing.T, before []string, operations []operation, after []string
 
        for i, op := range operations {
                cursor := cursors[i]
-               if !cursor.HasSelection() {
+               if op.start == op.end {
                        assert.Equal(op.start, cursor.Loc)
                } else {
                        assert.Equal(op.start, cursor.CurSelection[0])