Skip to content

Commit eaf0a95

Browse files
authored
fix backspace at beginning of lines
1 parent ec85be5 commit eaf0a95

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

cosu.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1992,7 +1992,7 @@ function input.insert.cursorBackspace(bJump)
19921992
if not bJump and sLine:sub(tCursor.x-cosuConf.nTabSpace, tCursor.x-1) == (' '):rep(cosuConf.nTabSpace) then
19931993
tContent[tCursor.y] = sLine:sub(1, tCursor.x - cosuConf.nTabSpace - 1) .. sLine:sub(tCursor.x)
19941994
for i=1, cosuConf.nTabSpace do input.insert.cursorHorizontal("left") end
1995-
elseif tCursor.x > 1 then
1995+
elseif tCursor.x >= 1 then
19961996
local removes = bJump and computeJump(tContent[tCursor.y], "left") or 1
19971997
tContent[tCursor.y] = sLine:sub(1, tCursor.x - 1 - removes) .. sLine:sub(tCursor.x)
19981998
for i=1, removes do input.insert.cursorHorizontal("left") end

0 commit comments

Comments
 (0)