Textedit improvements

This commit is contained in:
Eduardo Bart
2013-01-25 09:44:15 -02:00
parent 95f79b45dc
commit 0a91fff82a
7 changed files with 36 additions and 5 deletions

View File

@@ -25,6 +25,7 @@ local function navigateCommand(step)
if currentHistoryIndex > 0 then
local command = commandHistory[numCommands - currentHistoryIndex + 1]
commandTextEdit:setText(command)
commandTextEdit:setCursorPos(-1)
else
commandTextEdit:clearText()
end
@@ -52,6 +53,7 @@ local function completeCommand()
-- complete command with one match
if #possibleCommands == 1 then
commandTextEdit:setText(possibleCommands[1])
commandTextEdit:setCursorPos(-1)
-- show command matches
elseif #possibleCommands > 0 then
print('>> ' .. commandBegin)
@@ -75,6 +77,7 @@ local function completeCommand()
end
end
commandTextEdit:setText(commandBegin)
commandTextEdit:setCursorPos(-1)
for i,v in ipairs(possibleCommands) do
print(v)

View File

@@ -39,6 +39,8 @@ UIWindow
anchors.right: parent.right
margin-left: 5
font: terminus-14px-bold
selection-color: black
selection-background-color: white
ResizeBorder
id: bottomResizeBorder