cursor tweak

This commit is contained in:
Anton Dyudin 2015-04-14 13:57:12 -07:00
parent 6d76b13162
commit 93c2956fc7
3 changed files with 7 additions and 6 deletions

View File

@ -100,7 +100,7 @@
when 'bel' then flash ($ 'body'), 'black'
when 'nex' then update
input: ""
cursor: 1
cursor: 0
history: [matr.props.input, matr.props.history...]
# else throw "Unknown "+(JSON.stringify ruh)
else v = Object.keys(ruh); console.log v, ruh[v[0]]
@ -111,7 +111,7 @@
sendAction = (data)->
urb.send {mark: 'sole-action', data}, (e,res)->
if res.status isnt 200 then $('#err')[0].innerText = err.data.mess
if res.status isnt 200 then $('#err')[0].innerText = res.data.mess
doEdit = (ted)->
det = buffer.transmit ted
@ -158,8 +158,9 @@
update cursor: curs-1
when 'right' then if curs < buffer.buf.length
update cursor: curs+1
when 'baxp' then doEdit del: curs-1
else (if key.act then console.log key.act)
when 'baxp' then if curs > 0
doEdit del: curs-1
#else (if key.act then console.log key.act)
# amod = (arr)->
# for i in arr

View File

@ -64,4 +64,4 @@ module.exports =
MessageDispatcher.handleViewAction
type:"message-send"
message:_message
window.chat.MessagePersistence.sendMessage _message.thought
window.chat.MessagePersistence.sendMessage _message.thought

View File

@ -55,4 +55,4 @@ module.exports =
}, (err,res) ->
console.log 'sent'
console.log arguments
cb(err,res) if cb
cb(err,res) if cb