ctrl+up/down now put the cursor after the message with and with a space [thanks to rohan and me]
This commit is contained in:
parent
1f256b7431
commit
b657c0ff8c
|
@ -875,6 +875,7 @@ class Chat:
|
|||
self.sent_history[jid][i] = self.sent_history[jid][i+1]
|
||||
self.sent_history[jid][max_size - 1] = message
|
||||
else:
|
||||
message += ' ' # append message with a space
|
||||
self.sent_history[jid].append(message)
|
||||
|
||||
self.sent_history_pos[jid] = size + 1
|
||||
|
|
|
@ -482,9 +482,11 @@ class GroupchatWindow(chat.Chat):
|
|||
elif event.keyval == gtk.keysyms.Up:
|
||||
if event.state & gtk.gdk.CONTROL_MASK: #Ctrl+UP
|
||||
self.sent_messages_scroll(room_jid, 'up', widget.get_buffer())
|
||||
return True # override the default gtk+ thing for ctrl+up
|
||||
elif event.keyval == gtk.keysyms.Down:
|
||||
if event.state & gtk.gdk.CONTROL_MASK: #Ctrl+Down
|
||||
self.sent_messages_scroll(room_jid, 'down', widget.get_buffer())
|
||||
return True # override the default gtk+ thing for ctrl+down
|
||||
else:
|
||||
self.last_key_tabs[room_jid] = False
|
||||
|
||||
|
|
|
@ -306,9 +306,11 @@ class TabbedChatWindow(chat.Chat):
|
|||
elif event.keyval == gtk.keysyms.Up:
|
||||
if event.state & gtk.gdk.CONTROL_MASK: #Ctrl+UP
|
||||
self.sent_messages_scroll(jid, 'up', widget.get_buffer())
|
||||
return True # override the default gtk+ thing for ctrl+up
|
||||
elif event.keyval == gtk.keysyms.Down:
|
||||
if event.state & gtk.gdk.CONTROL_MASK: #Ctrl+Down
|
||||
self.sent_messages_scroll(jid, 'down', widget.get_buffer())
|
||||
return True # override the default gtk+ thing for ctrl+down
|
||||
|
||||
def send_message(self, message):
|
||||
"""Send the message given in the args"""
|
||||
|
|
Loading…
Reference in New Issue