Fix full line cut when only a single line remains
This commit is contained in:
@@ -65,6 +65,8 @@ local function cut_or_copy(delete)
|
|||||||
if delete then
|
if delete then
|
||||||
if line1 < #doc().lines then
|
if line1 < #doc().lines then
|
||||||
doc():remove(line1, 1, line1 + 1, 1)
|
doc():remove(line1, 1, line1 + 1, 1)
|
||||||
|
elseif #doc().lines == 1 then
|
||||||
|
doc():remove(line1, 1, line1, math.huge)
|
||||||
else
|
else
|
||||||
doc():remove(line1 - 1, math.huge, line1, math.huge)
|
doc():remove(line1 - 1, math.huge, line1, math.huge)
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user