In theory: ```lua local function GetEmptyLines(sLE, iLE) local sR = "" for i = 1, iLE do sR = sR .. sLE end return sR end
local aEOL = {"\r\n", "\r", "\n"} local iEOL = geany.scintilla("SCI_GETEOLMODE") local sAdd = GetEmptyLines(aEOL[iEOL + 1], 15)
local iCurPos = geany.caret() local iL, iC = geany.rowcol(iCurPos) iCurPos = geany.scintilla("SCI_GETLINEENDPOSITION", iL - 1) geany.caret(iCurPos) geany.selection(sAdd) geany.caret(iCurPos) ```
```lua local function GetEmptyLines(sLE, iLE) local sR = "" for i = 1, iLE do sR = sR .. sLE end return sR end
local aEOL = {"\r\n", "\r", "\n"} local iEOL = geany.scintilla("SCI_GETEOLMODE") local sAdd = GetEmptyLines(aEOL[iEOL + 1], 25)
local iLines = geany.height() local iCurPos = geany.rowcol(iLines + 1, 0) local sTxt = geany.text() geany.text(sTxt .. sAdd) geany.caret(iCurPos) ```
Adding Precision
Try this version of `GetEmptyLines`, only for tests ```lua local function GetEmptyLines(sLE, iLE) local sR = "" for i = 1, iLE do sR = sR .. "::" .. i .. "::" .. sLE end return sR end ```
Would think the word "cursor" would be used at least once to describe something in the GeanyLua documentation :)
Try "caret" :)