]> git.lizzy.rs Git - micro.git/blobdiff - runtime/plugins/autoclose/autoclose.lua
Merge branch 'python-highlight-zero' of https://github.com/a11ce/micro into a11ce...
[micro.git] / runtime / plugins / autoclose / autoclose.lua
index dd4441813b94b277360d34c6ebdcc2b554638716..531b7601962d0a0881d773ccccc05587be47c30a 100644 (file)
@@ -28,7 +28,7 @@ function onRune(bp, r)
         if r == charAt(autoclosePairs[i], 1) then
             local curLine = bp.Buf:Line(bp.Cursor.Y)
 
-            if bp.Cursor.X == utf8.RuneCountInString(curLine) or not uutil.IsWordChar(charAt(curLine, bp.Cursor.X+1)) then
+            if bp.Cursor.X == uutil.CharacterCountInString(curLine) or not uutil.IsWordChar(charAt(curLine, bp.Cursor.X+1)) then
                 -- the '-' here is to derefence the pointer to bp.Cursor.Loc which is automatically made
                 -- when converting go structs to lua
                 -- It needs to be dereferenced because the function expects a non pointer struct