1
0
mirror of https://github.com/LDDestroier/CC/ synced 2024-11-05 01:26:20 +00:00

Fixed selecting on empty lines

This commit is contained in:
LDDestroier 2019-03-29 20:45:39 -04:00 committed by GitHub
parent 61e41ad13b
commit fb7becd17b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1005,6 +1005,7 @@ prompt = function(prebuffer, precy, maxY, _eldit)
if keysDown[keys.leftShift] or keysDown[keys.rightShift] then
if evt[2] == keys.c or evt[2] == keys.x then
doRender = true
if #eldit.selections == 0 then
barmsg = "No selections have been made."
barlife = defaultBarLife
@ -1301,9 +1302,9 @@ prompt = function(prebuffer, precy, maxY, _eldit)
miceDown[evt[2]] = {x = evt[3], y = evt[4]}
if lastMouse.x and lastMouse.y and lastMouse.curID then
local adjMY = lastMouse.y + lastMouse.scrollY
local adjMX = math.min(lastMouse.x + lastMouse.scrollX, #eldit.buffer[adjMY] + 1)
local adjMX = math.min(lastMouse.x + lastMouse.scrollX, #(eldit.buffer[adjMY] or "") + 1)
local adjEY = evt[4] + eldit.scrollY
local adjEX = math.min(evt[3] + eldit.scrollX, #eldit.buffer[adjEY] + 1)
local adjEX = math.min(evt[3] + eldit.scrollX, #(eldit.buffer[adjEY] or "") + 1)
local selID
local cSelID = checkIfSelected(adjMX, adjMY)
if (lastMouse.ctrl and not isSelecting) or #eldit.selections == 0 then