mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-16 13:57:07 +09:00
Expose CharacterCount to plugins
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user