mirror of
https://github.com/urbit/shrub.git
synced 2024-12-14 20:02:51 +03:00
cursor tweak
This commit is contained in:
parent
6d76b13162
commit
93c2956fc7
@ -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
|
||||
|
@ -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
|
||||
|
@ -55,4 +55,4 @@ module.exports =
|
||||
}, (err,res) ->
|
||||
console.log 'sent'
|
||||
console.log arguments
|
||||
cb(err,res) if cb
|
||||
cb(err,res) if cb
|
||||
|
Loading…
Reference in New Issue
Block a user